Part Number:MSP430F5529
Tool/software: Code Composer Studio
Hello,
I am using CCS v6.2 and v1_00_12_00 of MSP430 Custom BSL to create my own bootloader to fit my communication needs. I modified MSP430F5418 example project to MSP430F5529, that also included some changes to linker file. However when I builded project I noticed, that sections created in BSL430_LOW_LEVEL_INIT.asm file doesn't appear in generated TI-HEX file nor are listed during linking. Espescially the ".ZAREA" section is missing which I planned to use for "jumping" into Bootloader.
Linker creating HEX file:
Translating to TI-TXT format...
"MSP430_BSL.out" .BSL430_VERSION_VENDOR ==> .BSL430_VERSION_VENDOR
"MSP430_BSL.out" .BSL430_VERSION_CI ==> .BSL430_VERSION_CI
"MSP430_BSL.out" .BSL430_VERSION_API ==> .BSL430_VERSION_API
"MSP430_BSL.out" .BSL430_VERSION_PI ==> .BSL430_VERSION_PI
"MSP430_BSL.out" .text:_isr ==> .text:_isr
"MSP430_BSL.out" .text ==> .text
"MSP430_BSL.out" .cinit ==> .cinit
"MSP430_BSL.out" RTC ==> RTC
"MSP430_BSL.out" PORT2 ==> PORT2
"MSP430_BSL.out" TIMER2_A1 ==> TIMER2_A1
"MSP430_BSL.out" TIMER2_A0 ==> TIMER2_A0
"MSP430_BSL.out" USCI_B1 ==> USCI_B1
"MSP430_BSL.out" USCI_A1 ==> USCI_A1
"MSP430_BSL.out" PORT1 ==> PORT1
"MSP430_BSL.out" TIMER1_A1 ==> TIMER1_A1
"MSP430_BSL.out" TIMER1_A0 ==> TIMER1_A0
"MSP430_BSL.out" DMA ==> DMA
"MSP430_BSL.out" USB_UBM ==> USB_UBM
"MSP430_BSL.out" TIMER0_A1 ==> TIMER0_A1
"MSP430_BSL.out" TIMER0_A0 ==> TIMER0_A0
"MSP430_BSL.out" ADC12 ==> ADC12
"MSP430_BSL.out" USCI_B0 ==> USCI_B0
"MSP430_BSL.out" USCI_A0 ==> USCI_A0
"MSP430_BSL.out" WDT ==> WDT
"MSP430_BSL.out" TIMER0_B1 ==> TIMER0_B1
"MSP430_BSL.out" TIMER0_B0 ==> TIMER0_B0
"MSP430_BSL.out" COMP_B ==> COMP_B
"MSP430_BSL.out" UNMI ==> UNMI
"MSP430_BSL.out" SYSNMI ==> SYSNMI
"MSP430_BSL.out" .reset ==> .reset
Begging of Hex file:
@1010
00 08 08 04
@1042
32 D0 10 00 FD 3F 03 43 6A 15 21 83 0E 41 3E 80
00 1C 3F 40 FE 1B 0F 5E 8F 43 00 00 2F 83 2E 83
FB 23 82 43 0E 1D B2 40 00 A5 10 1D B2 40 00 1C
04 1D B2 40 00 1C 06 1D B2 40 41 03 0A 1D B2 40
...
As seen above, no code was allocated to ZAREA (0x1000) section
Linker file may be found here: (Please visit the site to view this file)
When chaning this section in linker file :
.ZAREA : {} > ZAREA
To this:
.ZAREA{
BSL430_Low_Level_Init.obj(.ZAREA)
} > ZAREA
Linker returns following warning on line specifing input object : "#10068-D no matching section".
I dumped BSL430_Low_Level_Init.obj using dis430 and sections appear to be created correctly:
Disassembly of BSL430_Low_Level_Init.obj:
TEXT Section .ZAREA, 0x10 bytes at 0x0
000000: .ZAREA:
000000: BSL_Entry_JMP:
000000: 053C JMP (C_Branch)
000002: 8000 BRA #SYSCTL
000004: 0000
000006: FF3F JMP (SBSLSigLoc)
000008: FF3F JMP (0x0008)
00000a: FF3F JMP (BslEntryLoc)
00000c: C_Branch:
00000c: 3040 BR #SYSCTL
00000e: 0000
TEXT Section .ZAREA_CODE, 0x2E bytes at 0x0
000000: .ZAREA_CODE:
000000: BSL_ACTION0:
000000: 3D90 CMP.W #0xdead,R13
000002: ADDE
000004: 0420 JNE (RETURN_ERROR)
000006: 3E90 CMP.W #0xbeef,R14
000008: EFBE
00000a: 0120 JNE (RETURN_ERROR)
00000c: 033C JMP (RETURN_TO_BSL)
00000e: RETURN_ERROR:
00000e: 0C43 CLR.W R12
000010: 0D43 CLR.W R13
000012: 1001 RETA
000014: RETURN_TO_BSL:
000014: 3C41 POP.W R12
000016: 3D41 POP.W R13
000018: 1001 RETA
00001a: BSL_Protect:
00001a: 0C43 CLR.W R12
00001c: B2D0 BIS.W #0x8003,&SYSCTL
00001e: 0380
000020: 0000
000022: B2B0 BIT.W #0x0010,&SYSCTL
000024: 1000
000026: 0000
000028: 0124 JEQ (BCC2BSL)
00002a: 2CD3 BIS.W #2,R12
00002c: BCC2BSL:
00002c: 1001 RETA
DATA Section .BSLSIG, 0xC bytes at 0x0
000000: .BSLSIG:
000000: ffff .word 0xffff
000002: BslProtectVecLoc:
000002: 0000 .word 0x0000
000004: PBSLSigLoc:
000004: 3ca5 .word 0x3ca5
000006: SBSLSigLoc:
000006: c35a .word 0xc35a
000008: ffff .word 0xffff
00000a: BslEntryLoc:
00000a: 0000 .word 0x0000
DATA Section .JTAGLOCK_KEY, 0x4 bytes at 0x0
000000: PJTAGLOCK_KEY:
000000: .JTAGLOCK_KEY:
000000: ffff .word 0xffff
000002: SJTAGLOCK_KEY:
000002: ffff .word 0xffff
Is this problem related to project configuration? When trying to build this project for the first time, environment prompted me to change compiler version, as this used in project was outdated.
Thank you for any help or tips where to look for problem.
Tom