-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build to target on custom board without ID block #12
Comments
I think you'll need to define more macros. Is your board based on an existing module? You'd want to copy values from that module type, since there's conditional code in In Dynamic C 10, the Write ID Block program required declaration of many macros that the compiler normally sets using values from the System ID Block. For example, the RCM4200 has users setting the following:
I see similar macros from the Would it be possible to install a System ID Block on your custom device? You could then make changes to You might also want to take a look at |
strings boardinfo.bin extracted the following macros, targetless bin built with the project definition that allows to produce the usable bin =>MACRO CLOCK_DOUBLED=1 looks like the memory declarations are not getting into it Yes, it is possible to rewrite the ID block, tried with the provided WRITE_IDBLOCK_920_962 but without favorable results. The issue is only related to build to target where DC9 takes information from the target before building, my best guess now is that it is finding the erased flash data all FF and then choosing an inappropriate root code size |
Added the printf for the other two macros and now they show up as expected |
Is there documentation on the communication protocol to see what data is retrieved from the target? |
Added to the application source the macro hints from your boardinfo to have the macro values in the actual condition of the failure line 57 : WARNING UPDCLITE_UNI_2.C : =>MACRO _FLASH_SIZE_=64 line 58 : WARNING UPDCLITE_UNI_2.C : =>MACRO _RAM_SIZE_=32 line 1 : ERROR DKENTRY.LIB : Out of root code space, try moving code to XMEM. |
What do you use for |
Retrieved an original board to have a known reference, here is the output of block id dump for future use System ID Block content: tableVersion = 2 flashID = 0xFFFFBFB6 flash2ID = 0x00000000 ramID = 0x00000001 cpuID = Rabbit 2000 (rev. 3) macAddr = 00:00:00:00:00:00 reserved[0] = 0x00 idBlockSize = 0x00000084 bytes idBlockCRC = 0x004C |
We already provide a sample program to dump the ID block. And a program to write the ID block, that you could use to add an ID block to your custom board. You had originally reported that you could compile to a .bin file, but not to your target without an ID block. Were you able to find a set of macros that allowed you to still compile to your board? It should be possible, because the Write ID Block program will work on a board without a valid ID block. |
I have to wait to have again the board available, I am confident that with a reference valid data I can tinker the ID block content to overcome the issue of having the compiler misunderstanding the board memory size. By the way the system is kind of ready to manufacturing |
If you write a System ID Block with the correct values to your custom board (using write_idblock_920_962.c), it will make it easier to use it with Dynamic C. You can also make use of the UserBlock APIs to store non-volatile data on the flash. Take a look at Samples/UserBlock to see what's possible there. |
Now with the custom board available the little idblock data dump utility is showing all zeros which is consistent with the "insufficient memory" error, looks like there is something edgy about the flash handling in the bootloader. RFU can load the binary but the bootloader can't find the flash, so now digging about flash CS selection, any hint is appreciated. |
@devotip, I don't think I mentioned it earlier, but the repository includes documentation of the bootstrapping process. Bootstrapping uses various probing techniques to locate RAM and flash in order to load software to the flash. Is your custom board design based on one of Digi's Rabbit products? If so, you might be able to write an ID block just claiming to be that product. Is it a flash device listed in the flash.ini file? If not, you'll need to add it. Are you sure you're actually reading the flash when you run your test program? If the memory mapping isn't correct, you could just be reading an idle memory bus. The Memory Management Unit section of the Rabbit 2000 Reference Poster shows how the CS, OE, and WE signals identify a memory device, and how you can then map those devices to the four memory quadrants of the memory controller. You can take a look at RCM2xxx schematics for some examples of how Digi's products mapped RAM and flash, and then look through |
@devotip, I wanted to check in and see how you're doing with this issue. Were you able to make any progress with information from my last comment? |
I am dealing with a custom board that has no ID block data.
The targetless build is working well with the data I set in the project options and by downloading the binary with RFU utility i can confirm that the application is working.
If I do a build to target the build fails because the data retrieved from the custom board makes the compiler believes there is not enough memory.
I tried to define in the project options the memory size in 4k blocks as follow but that data is ignored
BOARD_TYPE=0xFFFF
FLASH_SIZE=64
RAM_SIZE=32
Is there a way to enforce ram and flash size when doing a build to target so that the compiler is happy and the debugger becomes available?
The text was updated successfully, but these errors were encountered: