Basic ThreadX
This example application blinks an LED to show the Azure RTOS ThreadX threads that are running and to indicate status
Description
This demonstration creates a task which toggle an LED for every 500ms.
Downloading and building the application
To clone or download these applications from Github, go to the main page of this repository and then click Clone button to clone this repository or download as zip file. This content can also be downloaded using content manager by following these instructions
Path of the application within the repository is apps/threadx/basic_threadx/firmware/
To build the application, refer to the following table and open the project using its IDE.
Azure RTOS ThreadX Application
Project Name | Description |
---|---|
sam_a5d2_xult.X | MPLABX project for SAMA5D2 Xplained Ultra Evaluation Kit |
sam_a5d2_xult_iar.IAR | IAR project for SAMA5D2 Xplained Ultra Evaluation Kit |
Setting up AT91Bootstrap loader
To load the application binary onto the target device, we need to use at91bootstrap loader. Refer to the at91bootstrap loader documentation for details on how to configure, build and run bootstrap loader project and use it to bootstrap the application binaries.
Setting up the hardware
The following table shows the target hardware for the application projects.
Project Name | Board |
---|---|
sam_a5d2_xult.X sam_a5d2_xult_iar.IAR | SAMA5D2 Xplained Ultra Evaluation Kit |
Setting up SAMA5D2 Xplained Ultra Evaluation Kit
Addtional hardware required
- SD Card with FAT32 file system
Setting up the SD Card
- Download harmony MPU bootstrap loader from this location
- Copy the downloaded boot loader binary( boot.bin) onto the SD card
Setting up the board
- SDMMC slot used for bootloading the application is SDMMC1
- Short jumper JP2 (DEBUG_DIS)
- Connect the Debug USB port on the board to the computer using a micro USB cable
Running the Application
- Build the application using its IDE
- Copy the output binary (named ‘harmony.bin’) onto the SD Card (Refer to the ‘Setting up hardware’ section above for setting up the SD card)
- Insert the SD card into SDMMC slot on the board (Refer to the ‘Setting up hardware’ section for the correct SDMMC slot)
- Reset the board to run the application
- The LED indicates the success or failure.
- The LED toggles on success i.e. for every 500 ms.
Refer to the following table for LED name:
Board | LED Name |
---|---|
SAMA5D2 Xplained Ultra Evaluation Kit | RGB_LED(Green) |