Freescale Semiconductor 802.15.4 manual Source Files, Target.h

Page 46
.\802.15.4_Headers\Ghdr

6.4 Source Files

This section describes the source files.

6.4.1 Target.h

The user must define the PCB target specific #defines in the Target.h in the

. file for a successful port.

NOTE

Several other #defines are made in the target description in target.h. The #defines are used by the 802.15.4 MAC/PHY build. The listed #defines are the ones which must (also) be defined for the Embedded Bootloader:

Example for the Freescale TARGET_DIG528_2 and TARGET_DIG536_2:

MC13192 reset pin connection:

#define

HWAssertAbelReset

PTCD

&=

~0x10;

//

Reset

=

0;

#define

HWDeAssertAbelReset

PTCD

=

0x10;

//

Reset

=

1;

Optional for Safe Mode Boot indicator function (LED pin connections):

#define LED1ON PTDD &= 0xFE; #define LED1OFF PTDD = 0x01; #define LED1TOGGLE PTDD ^= 0x01;

#define LED2ON PTDD & = 0xFD; #define LED2OFF PTDD = 0x02; #define LED2TOGGLE PTDD ^ = 0x02;

#define LED3ON PTDD & = 0xF7; #define LED3OFF PTDD = 0x08; #define LED3TOGGLE PTDD ^ = 0x08;

#define LED4ON PTDD & = 0xEF; #define LED4OFF PTDD = 0x10; #define LED4TOGGLE PTDD ^ = 0x10;

The MC13192 attention and reset pin (bit) positions:

#define

ABEL_ATT_PIN

(1<<2)

#define

ABEL_RESET_PIN

(1<<4)

HCS08 port setup macros:

#define mSETUP_PORT_A //PTAPE = 0x3C;\

6-4

Embedded Bootloader Reference Manual, Rev 0.0

Freescale Semiconductor

Image 46
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 Chapter Embedded Bootloader Description TargetPorted Targets Axiom AXM-0308Potential Issues FeaturesBenefits Optional Firmware Upload Settings Upload Firmware Chapter Using the Embedded BootloaderUse Case One Safe Mode Boot Use Case TwoAn Example of How to Change the MAC Address Updating Non-volatile Memory NVMSystem Bus Frequency Uart Baud RateChapter Test Tool Zigbee Flash Tool Using the Tools Menu Option Graphical User Interface GUI VersionUsing the View Menu Option View Menu OptionSelecting the Firmware File to Upload Firmware UploadAfter a Successful Firmware Upload Using the Help Menu Changing the NVM Data in Flash or FileSystem Configuration Window Command Line Version CMD Command Line Version Parameter ListNormal Use Example Default Flash Erase Disabled ExampleEmbedded Bootloader Reference Manual, Rev Chapter Embedded Bootloader Programming Programming To An Empty Erased BoardConnection 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 Product Deliverables Embedded Bootloader ImageChapter Application Integration Reference Guide Application Support FilesApplication Linker File Unreferenced SymbolsApplication Compiler DefinesDigiType.h System Clock SetupApplication Support Files 2 Gb60io.h3 Crt0.c and Crt.h NVData.c and NVData.h EmbeddedBootloader.h and EmbeddedBootloader.cISRVectors.c DummyIsr.c 1 HCS08 Compiler Embedded Bootloader Build EnvironmentChapter Port Integration Reference Guide 2 HCS08 Linker2 HCS08FlashLib.Lib EmbeddedBootloader.mcpEmbeddedBootloaderFunctionalityLib.Lib Source FilesStandard Libraries Porting to a Specific TargetCode and Data Segments Compiler #definesSource Files Target.hResetVector.c EmbeddedBootloaderTarget.hHWInit.c HWInit.hMain.c 802.15.4/Zigbee Application Accessible Functions Chapter Embedded Bootloader Public Function DescriptionEnableDownloadFirmware Embedded Bootloader boot flag HardReset UpdateNVRAMNVFlashSetup FLICGSetupUARTPortSelect Output NoneEmbedded Bootloader Reference Manual, Rev Chapter Embedded Bootloader Memory Map 128 Direct Port Registers1BFF 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 Appendix a Release Folder and File Structure Folder StructureFile Structure EmbeddedBootloaderFunctionalityLib.Lib Functionality library Embedded Bootloader Reference Manual, Rev