The TivaC_RemoteUpdater_Demo showcases a robust system for remotely updating firmware on Tiva C Series microcontrollers. This project demonstrates:
- A Python-based remote firmware updater for seamless communication through UART between the host and target.
- A bootloader for secure and efficient firmware updates.
- An LED application to demonstrate GPIO functionality.
- Cross-Platform:
- Python-based, runs on Linux, macOS, and Windows.
- Command-Based Communication via UART:
- Reliable transfer with retry mechanisms.
- Handles commands like
PING
,DOWNLOAD
,SEND_DATA
,RUN
, andRESET
.
- Firmware Update via UART:
- Handles commands like
PING
,DOWNLOAD
,SEND_DATA
,RUN
, andRESET
. - Manages flash programming and erasure.
- Handles commands like
- Application Switching:
- Transfers control to the updated application.
- Fault Handling:
- Validates firmware integrity during updates.
- GPIO Demonstration:
- Toggles an LED to verify functionality.
- Configurable Memory Location:
- Defined by the bootloader for separation.
.
├── bootloader # Source code for the bootloader
│ ├── Debug # Build artifacts
│ └── targetConfigs # Target configuration files
├── led_application # Source code for the LED application
│ ├── Debug # Build artifacts
│ └── targetConfigs # Target configuration files
├── firmware_updater # Python-based host application
│ ├── main.py # Entry point for the updater
│ ├── packet_handler.py # Manages communication with the bootloader
│ └── uart_handler.py # Handles UART communication
└── tools # Utilities and setup scripts
└── ccs_project_setup.sh # CCS environment setup script
Address Range | Section | Description |
---|---|---|
0x0000_0000 |
Bootloader Vector Table | Initial entry point and ISR table. |
0x0000_2800 |
Application Start | Memory location for the LED application. |
0x2000_0000 |
SRAM | Shared memory for stack and heap. |
- The bootloader checks for update signals in SRAM.
- Upon successful update, control is transferred to the application at
0x0000_2800
.
Hardware:
- Tiva C microcontroller (e.g., TM4C123GH6PM).
Software:
- Code Composer Studio (CCS)
- TivaWARE
- Python 3.x with
pyserial
-
Clone the repository:
git clone https://github.com/<your-username>/TivaC_Firmware_Update_Demo.git cd TivaC_Firmware_Update_Demo
-
Set up the CCS workspace:
bash tools/ccs_project_setup.sh
-
Build the
bootloader
andled_application
projects in CCS.
- Use the
main.py
script to update firmware:python3 firmware_updater/main.py
LED Application:
- The bootloader transfers control to the application after a successful update.
- The LED toggles as programmed.
Error Recovery:
- The updater retries commands to ensure robust communication.
The following diagram illustrates the system architecture: