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 INIT.A51 in UV2

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.

Parents
  • Well the thing you mentioned I guess is my only hope: "including both files in your project one right after the other." By keeping STARTUP.A51 and INIT.A51 next to each other in the project source group list, it seems to be working ok. When they were separated in th list, they located around my main code instead of before it. Thanks.

Reply
  • Well the thing you mentioned I guess is my only hope: "including both files in your project one right after the other." By keeping STARTUP.A51 and INIT.A51 next to each other in the project source group list, it seems to be working ok. When they were separated in th list, they located around my main code instead of before it. Thanks.

Children
No data