This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Locating data in upper 64K code w/o banking

I am sure someone has solved this problem multiple times but I cannot get to the actual solution. I have come close but no cigar yet.

What I want to do is create a project using Keil uVision4 tools that only contains data and locates that data at address 0x1F800, which would be in Bank 3, on a SiLabs C8051F121 with 128K of code flash.

Using the LX51 Locate tab in the IDE I can "reserve" the space up to 0x1F800 with "C:0x0000-C:0x1F7FF", though it is not necessary, it just allows the linker to warn me about overlaps. But I cannot locate my data at 0x1F800 using User Segments without turning on Banking and including some code in the project.

If I set my data at 0xF800 using User Segment, ?co?datablock(C:0xF800), all is great. I can create a hex file that has only the data located at 0xF800 and I can load teh data into the device using the debugger/emulator. I tried setting a User Segment of ?co?datablock(B3:0xF800) but I cannot get that to work without turning on banking and apparently needing L51_BANK.A51 support or something similar.

I know I can add an 04 record to the hex file to locate the data properly but I want the debugger to load the code correctly from the data only project and I cannot get that to work like I want.