-
Compile and run on
nativeplatform:make all term
-
Run
helpto see a list of all available commands> help help Command Description --------------------------------------- reboot Reboot the node ps Prints information about running threads. -
Look at the output of
ps> ps ps pid | name | state Q | pri | stack ( used) | base | current - | isr_stack | - - | - | 8192 ( -1) | 0x8055520 | 0x8055520 1 | idle | pending Q | 15 | 8192 ( 6240) | 0x8053240 | 0x80539dd 2 | main | running Q | 7 | 12288 ( 9312) | 0x8050240 | 0x8050ddd | SUM | | | 28672 (15552) -
Add a print statement to the
main()function to output the name of the board.printf("This application runs on %s\n", RIOT_BOARD);Recompile and run again:
make all term
-
Get to know your hardware
MCU ATSAMR21G18A Family ARM Cortex-M0+ Vendor Atmel RAM 32Kb Flash 256Kb Frequency up to 48MHz FPU no Timers 6 (1x 16-bit, 2x 24-bit, 3x 32-bit) ADCs 1x 12-bit (8 channels) UARTs / SPIs / I2Cs max 5 (shared) Vcc 1.8V - 3.6V -
To compile an application for a specific board, we can make use of the
BOARDenvironment variable.BOARD=samr21-xpro make all flash term
This command will compile the application, burn the image onto the
samr21-xproand open a connection to the RIOT shell. -
Verify the output of
RIOT_BOARDmatches your hardware.
