Freescale Semiconductor 802.15.4 manual Chapter Embedded Bootloader Programming

Page 27

Chapter 4

Embedded Bootloader Programming

This chapter describes how to program the Embedded Bootloader with a P&E Multilink for HCS08 BDM debugger. The Embedded Bootloader is normally downloaded to the PCB where production data is also written. Users must employ different procedures depending on what needs to be programmed. Users can program the Embedded Bootloader to an empty (erased) PCB or they can upgrade to a newer version of the Embedded Bootloader. Follow the procedures in Section 4.1, Programming To An Empty (Erased) Board if the PCB is empty (erased).

Users must make a copy of the production data section in the NVM (see Section 5.3.5, NV_Data.c and NV_Data.h) if they need to upgrade the Embedded Bootloader. This can be done either manually or automatically by a custom made script with the command line version of the CPROG tool. The command line version is not described further. Follow the procedures as shown in Section 4.2 on how to make a copy of the production data.

4.1 Programming To An Empty (Erased) Board

This section describes how to program the Embedded Bootloader to an empty (erased) board.

1.Execute the HIWAVE.EXE file from your chosen installation directory. For example, [installation directory]\Metrowerks\CodeWarrior_CW08_V3.0\Prog\

2.From the main window, setup the target by selecting the “Component” menu, then click on “Set Target”. The “Set Target” window appears as shown in Figure 12.

Figure 12 Set Target Window

3.In the “Processor” drop down menu, select HCS08. From the “Target Interface” drop down menu, select P&E Target Interface, the click on the “OK” button.

Freescale Semiconductor

Embedded Bootloader Reference Manual, Rev. 0.0

4-1

Image 27
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 TargetsFeatures Potential IssuesBenefits Optional Firmware Upload Settings Chapter Using the Embedded Bootloader Upload FirmwareUse Case One 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 Application Support Files Embedded Bootloader ImageChapter Application Integration Reference Guide Product DeliverablesCompiler Defines Unreferenced SymbolsApplication Application Linker File2 Gb60io.h System Clock SetupApplication Support Files DigiType.h3 Crt0.c and Crt.h EmbeddedBootloader.h and EmbeddedBootloader.c NVData.c and NVData.hISRVectors.c DummyIsr.c 2 HCS08 Linker Embedded Bootloader Build EnvironmentChapter Port Integration Reference Guide 1 HCS08 CompilerSource Files EmbeddedBootloader.mcpEmbeddedBootloaderFunctionalityLib.Lib 2 HCS08FlashLib.LibCompiler #defines Porting to a Specific TargetCode and Data Segments Standard LibrariesTarget.h Source FilesEmbeddedBootloaderTarget.h ResetVector.cHWInit.h HWInit.cMain.c Chapter Embedded Bootloader Public Function Description 802.15.4/Zigbee Application Accessible FunctionsEnableDownloadFirmware 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