dev:nab:v2:nabgcc
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| dev:nab:v2:nabgcc [2015/11/13 13:03] – created redox | dev:nab:v2:nabgcc [2023/11/24 22:23] (current) – redox | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | < | ||
| # NabGCC | # NabGCC | ||
| Line 21: | Line 22: | ||
| ## New architecture | ## New architecture | ||
| + | ├── inc # Header files | ||
| + | │ ├── hal # Hardware abstraction (Motor, LED, i2c, ...) | ||
| + | │ ├── net # Wifi specific (IEEE802.11, | ||
| + | │ ├── usb # USB Host and RT2501usb | ||
| + | │ ├── utils # Common tools | ||
| + | │ └── vm # | ||
| + | ├── mtl # Metal sources, for the BOOT bytecode | ||
| + | ├── openocd | ||
| + | │ ├── interface | ||
| + | │ │ └── ftdi | ||
| + | │ └── target | ||
| + | ├── src # Source files | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | ├── sys # System files (CPU and USB Host chip) | ||
| + | │ ├── asm # ASM sources for IRQ handlers and CPU initialization | ||
| + | │ ├── inc # Header files | ||
| + | │ └── src # Source files | ||
| + | └── testvm | ||
| + | ├── src -> ../src | ||
| + | └── stubs # Stubs replacing the µC specific parts | ||
| + | ├── hal | ||
| + | ├── usb | ||
| + | └── utils | ||
| + | |||
| ## Compile | ## Compile | ||
| + | |||
| + | Using the makefile in the root folder, you can build the whole firmware project with just: | ||
| + | |||
| + | make | ||
| + | |||
| + | Delete the objects files, and binaries with | ||
| + | |||
| + | make clean | ||
| + | |||
| + | The objects files should be in the `obj/` folder, and the binaries in the `bin/` folder. | ||
| ## Flash | ## Flash | ||
| + | |||
| + | Assuming you have OpenOCD running and connected to the target, flash a new firmware with | ||
| + | |||
| + | make program | ||
| + | |||
| ## Debug | ## Debug | ||
| + | |||
| + | You can load the firmware in GDB, and then debug your code: | ||
| + | |||
| + | arm-none-eabi-gdb ./ | ||
| + | |||
| + | Next commands are to be typed in GDB: | ||
| + | |||
| + | tar ext :3333 | ||
| + | mon reset init | ||
| + | | ||
| + | load | ||
| + | # And type ' | ||
| + | # Stop with Ctrl + C | ||
| + | # and it's like normal debugging ! | ||
| + | |||
| + | You can only set two breakpoints, | ||
| + | |||
| + | Happy hacking ! | ||
| + | |||
| ## Links | ## Links | ||
/home/share/www/redox.ws/wiki/data/attic/dev/nab/v2/nabgcc.1447419838.txt.gz · Last modified: 2023/11/24 21:55 (external edit)