Rich Bair

E128 start issues...

Discussion created by Rich Bair on Jul 26, 2006
Latest reply on Jul 31, 2006 by CompilerGuru

I have two current projects using a E64 80-pin part and a E128 11-pin part. For the former I'm able to load my code w/out issues. For the latter, I'm trying to load a very basic program and can't seem to get it to run at all. I build using maker.exe and a *.mak script. I've added this code to a generic CodeWarrior project to debug as well. This is simple init and turn on and LED code! Then I simulate, the code seems to get lost so I have a variety of questions/comments below and would appreciate any advice!

1) For the E128 part, I use INITRM = 0x20 in my _EntryPoint() code which is listed as INIT _EntryPoint in the PRM file. I also have RAM defined as 0x2000 - 0x3FFF in my PRM file. I think this is aligning my 8k RAM end to 0x3FFF. I'm leaving the INITRG at reset value 0x00 for both the E64 and E128.

2) What are the RAM boundaries for the E64 and E128? The E64 works when I set INITTM 0x30 and use PRM defining RAM from 0x3000 to 0x3FFF (4k).

3) I'm thinking of changing these to...0x21 and 0x39 to force alignment to the upper range but I have a hunch the alignment bit does not matter for these two parts but I'm uncertain as I can't find the boundary information! I've seen threads talking about 12k RAM in 16k boundary parts where this is more critical. For my two cased I surmise since the 0x20 sets the start it's really not meaningful to set the end too as 8K will put it there anyway.

4) I checked the MOD lines and things look good there. I confirmed with the debugger that the simple code is getting lost just after Init() in start12.c. Funny thing is, in the simulator this works just fine!

5) I don't specifically set PPAGE anywhere. I am using the -Mb switch for the compiler and assembler. I read some posts indicating main() might not be possible to find; however, my DEFAULT_ROM maps like: INTO PAGE_4400, PAGE_3C, PAGE_3D and followed by Page 38-3B for the E128 only. The 4400 is because I have a sector of flash variable storage from 4000 to 43FF...btw, is the sector size 0x400 for both the E128 and E64?.

6) I use -CpPPAGE=RUNTIME. Can someone explain this directive? I know it works with datapage.c but the default of 0x35 doesn't make sense to me. Is this setting where the PPAGE register is OR what it's value should be? For E64 this would be 0x3C-3F and fro E128 this would be 0x38-0x3F, right?

7) I've also tried programming with pemicro's prog12z with no luck. It works on the E64 but not the E128. Another point of intereset is that I used the -EnvSRECORD=SX and then use log2phy to convert the *.sx file. This works fine with my E64 code. For whatever reason, the *.phy files coming out of CodeWarrior seem much smaller! I took all my code and added it to a test CodeWarrior project to debug via my P&E USB-12 (???).

This code is extremely simple so that's why I really think I'm missing something specific to the E128. My E64 code was my first HCS12 experience and it seems to be working well so again, I feel I'm missing something particular to the E128 which is the first part in this series I've used that breaks the 64k address space.

Thanks for reading!