We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm trying to locate the INIT.A51 code in a specific spot and I cannot figure out how to do it. I can locate STARTUP.A51 where I want it by added this to the BL51 tab in UV2: ?C_C51STARTUP(2000h) It does locate there as expected, but then in that code there is this asm instruction towards the end of the file: LJMP ?C_START which jumps to the file INIT.A51 (which eventually jumps to MAIN) The order of the code in memory is roughly like this: C_C51STARTUP MAIN C_START Every time I edit the size of MAIN(), the address of C_START changes. I need them to be in this order: C_C51STARTUP C_START MAIN so the two assembly files are next to each other and before MAIN(). How can I do that? I've looked at the map file and I don't even see the starting address for C_START.
Ok, If I have to spell it out I suppose I will. I have a Cypress AN2131 system and I need to run code from flash ROM. I also need to be able to update the flash ROM in the field through a 'serial' port. There is about 6KB of RAM internal to the device. There are two basic modes of this part EA=1, and EA=0. If EA=1, then ALL PM space is external. If EA=0, then the internal RAM can be used for PM or DM space. I need to use this internal RAM to execute flash updating code on the external flash ROM. I cannot run code in the internal RAM if EA=1. Therefore, I must run with EA=0. However, with EA=0 I cannot boot from the flash ROM, so I'm booting from a serial EEPROM instead. I want to locate the startup code (the two A51 files mentioned in the start of this thread) and my main function in a known spot and never have it move. My main function will basically contain some code that will never change and it basically will jump into the "main" system code. I can't have any of this move around because I'm soft protecting an area of the flash. So, can you tell me how to locate the INIT.A51? I played around last night with the order of the files in the project. If I put INIT.A51 right after STARTUP.A51 it 'seems' to work, but am I guaranteed it will always work?