Freescale Semiconductor 802.15.4 EmbeddedBootloader.h and EmbeddedBootloader.c, ISRVectors.c

Page 41

5.3.4 Embedded_Bootloader.h and Embedded_Bootloader.c

These are the interface files for the 802.14.4/Zigbee application. They contain function pointers to functions accessible in the Embedded Bootloader. These files also contain absolute addresses, which should not be changed.

Ensure that the two Embedded Bootloader control flags, which control whether the 802.15.4/Zigbee application starts or not, are included in the 802.15.4/Zigbee application build. See Section 5.2.2 for more details.

#pragma CONST_SEG APP_BOOTLOADER_FLAGS

//Default setting for how BootLoader downloads firmware const uint8_t boot_loader_control = ALL_BIT_ENABLED; const uint8_t boot_loader_flag = EXECUTE_APPLICATION;

#pragma CONST_SEG DEFAULT

The 802.15.4/Zigbee application must also call the “void BootLoader_Interface_Init(void)” function to set up pointers to the Embedded Bootloader accessible function. The function must be called once during system initialization.

NOTE

In earlier versions, these files were titled “FreeLoader_inf.c” and “FreeLoader_inf.h”. Do not user the “FreeLoader_inf.c” and “FreeLoader_inf.h” files with the Embedded Bootloader.

5.3.5 NV_Data.c and NV_Data.h

The NVM is not a part of the Embedded Bootloader. However, it is advised to make the NVM a part of the 802.15.4/Zigbee application.

The Embedded Bootloader can use the information in NV memory, but it has default values (safe mode boot) to cover scenarios where no NV memory is available, that is, the Embedded Bootloader would be locked to use the default values.

5.3.6 ISR_Vectors.c

The Embedded Bootloader redirects the ISR vector table to 0x0EFC0, i.e. the 802.15.4/Zigbee application ISR vector table must be locate at 0x0EFC0 to 0xEFFD (see linker file).

The file also contains a reset vector. The reset vector is not used (defined out) when using the Embedded Bootloader. The system reset vector is in the Embedded Bootloader address space (0xFFFE). The Embedded Bootloader has two system variables located where the redirected “reset vector” is locate at 0xEFFE to 0xEFFF. The variables control the startup of the Embedded Bootloader.

Freescale Semiconductor

Embedded Bootloader Reference Manual, Rev. 0.0

5-5

Image 41
Contents 802.15.4/Zigbee Embedded Bootloader How to Reach Us USA/Europe/Locations Not Listed Contents Embedded Bootloader Programming Embedded Bootloader Public Function Description Audience Conventions References Target Chapter Embedded Bootloader DescriptionAxiom AXM-0308 Ported TargetsBenefits FeaturesPotential Issues Optional Firmware Upload Settings Use Case One Chapter Using the Embedded BootloaderUpload Firmware Use Case Two Safe Mode BootUpdating Non-volatile Memory NVM An Example of How to Change the MAC AddressUart Baud Rate System Bus FrequencyChapter Test Tool Zigbee Flash Tool Graphical User Interface GUI Version Using the Tools Menu OptionView Menu Option Using the View Menu OptionFirmware Upload Selecting the Firmware File to UploadAfter a Successful Firmware Upload Changing the NVM Data in Flash or File Using the Help MenuSystem Configuration Window Command Line Version Parameter List Command Line Version CMDFlash Erase Disabled Example Normal Use Example DefaultEmbedded Bootloader Reference Manual, Rev Programming To An Empty Erased Board Chapter Embedded Bootloader ProgrammingConnection Assistant Window Load Executable Window Status Window Upgrading The Embedded Bootloader Connection Assistant Window Programmer Expert Window S19 File Window Status Window Embedded Bootloader Reference Manual, Rev Chapter Application Integration Reference Guide Embedded Bootloader ImageProduct Deliverables Application Support Files Application Unreferenced Symbols Application Linker File Compiler DefinesApplication Support Files System Clock SetupDigiType.h 2 Gb60io.h3 Crt0.c and Crt.h ISRVectors.c EmbeddedBootloader.h and EmbeddedBootloader.cNVData.c and NVData.h DummyIsr.c Chapter Port Integration Reference Guide Embedded Bootloader Build Environment1 HCS08 Compiler 2 HCS08 LinkerEmbeddedBootloaderFunctionalityLib.Lib EmbeddedBootloader.mcp2 HCS08FlashLib.Lib Source FilesCode and Data Segments Porting to a Specific TargetStandard Libraries Compiler #definesTarget.h Source FilesEmbeddedBootloaderTarget.h ResetVector.cMain.c HWInit.hHWInit.c EnableDownloadFirmware Chapter Embedded Bootloader Public Function Description802.15.4/Zigbee Application Accessible Functions Embedded Bootloader boot flag UpdateNVRAM HardResetFLICGSetup NVFlashSetupOutput None UARTPortSelectEmbedded Bootloader Reference Manual, Rev 128 Direct Port Registers Chapter Embedded Bootloader Memory Map1BFF 4BFF 4DFF 4FFF 8BFF 8DFF 8FFF Embedded Bootloader Reference Manual, Rev FFB0 Ffbf Cursive = fixed register and vectors in flash Embedded Bootloader Reference Manual, Rev Folder Structure Appendix a Release Folder and File StructureFile Structure EmbeddedBootloaderFunctionalityLib.Lib Functionality library Embedded Bootloader Reference Manual, Rev