1.2. Understanding The Framework Layout

1.2.1. File Hierarchy

firmware
├── Starter
│   └── L5_Application
├── examples
│       ├── FreeRTOS
│       │   └── L5_Application
│       ├── Telemetry
│       │   └── L5_Application
│       │       └── periodic_scheduler
│       ├── Assembly
│       │   └── L5_Assembly
│       └── CPPFreeRTOS
│           └── L5_Application
│               └── periodic_scheduler
└── lib
    ├── _can_dbc
    ├── L0_LowLevel
    │   └── source
    ├── L1_FreeRTOS
    │   ├── hooks
    │   ├── include
    │   ├── MemMang
    │   ├── portable
    │   ├── src
    │   └── trace
    ├── L2_Drivers
    │   ├── base
    │   └── src
    ├── L3_Utils
    │   ├── src
    │   └── tlm
    ├── L4_IO
    │   ├── fat
    │   ├── src
    │   └── wireless
    ├── L5_HighLevel
    │   ├── examples
    │   ├── periodic_scheduler
    │   └── source
    ├── L6_Testing
    └── newlib

1.2.2. Folder: firmware

This folder is meant to hold the firmware applications you make. The default applications are:

  • Starter: Template for simple single-threaded applications. (CMPE 30)
  • FreeRTOS: Template FreeRTOS application. (CMPE 127/146/243/244)
  • CPPFreeRTOS: Template FreeRTOS application. (CMPE 127/146/243/244)
  • Telemetry: Template program to demonstrate usage of Telemetry and FreeRTOS. (CMPE 127/146/243/244)
  • Assembly: Template application for building simple ARM assembly programs (CMPE 102)
  • Unittest: Template unit testing application. (CMPE 146/146/243/244)

1.2.3. Folder: firmware/<application>/L5_Application

The L5_Application folder holds the main.cpp file and other application layer files.

1.2.4. Folder: firmware/<application>/L5_Assembly

The L5_Assembly folder holds the main.S ARM assembly template program.

1.2.5. Folder: <applications>/build/bin

This folder holds the executables that can be loaded into the SJOne board .hex. It also holds the disassembly file .lst, linker file .map and the Executable and Linkable Format .elf file.

1.2.6. Folder: <application>/build/_can_dbc

The _can_dbc folder holds the CAN message description files and header generator.

1.2.7. Folder: <application>/build/obj

This folder holds object files created during the compilation stage of building. They are then all linked together to create an .elf file afterwards. The last phase converts the .elf to a .hex file to be loaded into SJ-One’s flash memory.

1.2.8. Folder: firmware/lib

This folder holds the core firmware files for the SJ-One file, such as abstractions for using GPIO, I2C, UART, Interrupts, etc.

1.2.9. Folder: firmware/lib/L%d_%s

The folders that start with L<some number>_<some folder name> are kind of self explanatory as to what they hold. For example, L1_FreeRTOS holds files pertaining to FreeRTOS and the FreeRTOS port files. L2_Drivers are device drivers and so on and so forth.