After arm wrestling with HT PICC to keep low memory blank.... (linker kept trying to use the six blank bytes from 2-7.)
This "bump" should work with the current BScreamer V1.6 which requires words 1-3 (bytes 2-7) be blank. Worth modifying BScreamer at some point to ignore 02-07 if they are either 00's or FF's.)
Just make sure your PSECTMAP looks similar to the one posted with nothing in 0x0001->0x0003 (PSECT display is somewhat erroneous. There is only one word of code in 0x0000h but it displays a range of $0000-$0001)
Note: Earlier version I posted was incorrect listing -L-pintret=04h instead of the correct interrupt entry -L-pintentry=04h .
Code: Select all
#asm psect reserved,class=CODE GOTO 0x18; Jump to init code #endasm // and add following switches to your linker command: // -L-preserved=0000h -L-pintentry=04h -L-pend_init=10h -L-ppowerup=18h -PSECTMAP Psect Usage Map: Psect | Contents | Memory Range ----------|------------------------------|-------------------- reserved | User defined psect | $0000 - $0001 intentry | Interrupt service routine | $0004 - $0007 text4 | Program and library code | $0008 - $000F end_init | Initialization code | $0010 - $0011 intret | Interrupt service routine | $0012 - $0016 powerup | Power on reset code | $0018 - $001B
Now let's get the FAQ updated and get rid of ALL references to user code starting at 0x0004. (The only reason this might work with CC5X is that the linker must prioritize intentry over other code for location 0x0004
More general case is to simply have the GOTO jump to a higher location in memory like 0x0018 and let the linker fill in the lower memory. This will work with / without interrupts.