Boot embARC with U Boot on HS Development Kit - foss-for-synopsys-dwc-arc-processors/embarc_osp GitHub Wiki
U-boot can be used with embARC on HSDK.
Note:
- embARC 2017.12 (or higher) and ARC GNU 2017.09 (or higher) are required.
- MicroSD card is required.
- Make sure U-Boot image version is Prebuilt Linux Distribution for ARC HS Development Kit (HSDK), 2018.01 (or higher). Go to U-Boot Image Recovery in On-Board SPI-Flash to update U-Boot image on HSDK.
- Visit Getting Started with embARC Software with GNU Tools to prepare embARC software.
- Visit Launching Baremetal Application on HSDK to launch baremetal application on HSDK.
Launching embARC Application on HSDK
Prepare BIN file in embARC
- Change to
<embARC_root>/exmaple/freertos/net/ntshell
and type the following commands in the command line.
make TOOLCHAIN=gnu BOARD=hsdk BD_VER=10 clean
make TOOLCHAIN=gnu BOARD=hsdk BD_VER=10
- Type the following command to generate BIN file.
make TOOLCHAIN=gnu BOARD=hsdk BD_VER=10 bin
Note:
- The
ntshell
example is used here inexmaple/freertos/net/ntshell
. The same build and run steps are useful for other examples on HSDK.
Launching embARC with U-Boot
-
Rename BIN file
app.bin
. Copy it to a MicroSD card and insert it to the HSDK card slot. -
Connect HSDK board to the host with USB. Open terminal emulation program to view UART output from HSDK. The switch Boot Image should be
0x1
to locate boot image in the on-board SPI flash. Press RESET to reset the board and hit any ket in the terminal to stop autoboot.
DRAM: 1 GiB
Relocation Offset is: 3ef67000
MMC: Synopsys Mobile storage: 0
Card did not respond to voltage select!
mmc_init: -95, time 9
** Bad device mmc 0 **
Using default environment
In: serial0@f0005000
Out: serial0@f0005000
Err: serial0@f0005000
Clock values are saved to environment
Net:
Warning: ethernet@f0008000 (eth0) using random MAC address - e6:a2:ac:b0:66:fe
eth0: ethernet@f0008000
hsdk#
- Type following commands step-by-step. Make sure the BIN file path is correct
hsdk# fatload mmc 0 0x80000000 app.bin
reading app.bin
361204 bytes read in 20 ms (17.2 MiB/s)
hsdk# run hsdk_hs38
hsdk# setenv core_entry_0 0x80000004
hsdk# hsdk_init
CPU start mask is 0x1
hsdk# hsdk_go
- Launch the embARC application after typing
hsdk_go
in the terminal.
Compiler Version: ARC GNU, 7.1.1 20170710
FatFS initialized successfully!
Start Init LWIP
ntshell command info(Information) was registered!
ntshell command main(Call main function) was registered!
ntshell command swape(Swap endianness of input variable) was registered!
ntshell command map(Show the memory map of bootloader) was registered!
ntshell command bcr(Dump processor build configuration) was registered!
ntshell command lr(Read auxiliary register) was registered!
ntshell command sr(Write auxiliary register) was registered!
ntshell command mem(Operate the memory) was registered!
ntshell command wifi(wifi operations) was registered!
ntshell command ls(List information about files) was registered!
ntshell command cd(Change the working directory) was registered!
ntshell command rm(Remove the file or the folder) was registered!
ntshell command mkdir(Create the directory) was registered!
ntshell command cat(Output file contents) was registered!
ntshell command cp(Copy source to destination) was registered!
ntshell command mv(Rename file or move file) was registered!
ntshell command pwd(Print the current working directory) was registered!
ntshell command touch(Create a file) was registered!
ntshell command ymodem(Ymodem file transfer protocol) was registered!
ntshell command disk(Operate the storge device) was registered!
ntshell command load(Load .bin file from SD card to ram at specified address) was registered!
ntshell command boot(Load application specified in a boot.cfg file from sdcard and run) was registered!
ntshell command go(Run the program at the specified address) was registered!
NTShell Task StartUp
COM1>
Note:
- Go to emARC OSP Documentation for embARC details.