CompilerGuru wrote:
> But using things like 'ORG $308000' doesn't work.
That's exactly what I would use. So the question is what does not work? And how do you find it out?
Issues with flashing the code into the target or issues at runtime?
..........
Daniel
The plot thickens ......
Looks like I was wrong about the 'ORG $308000' not working. I just needed to sort out the 'SECTION' statements !
However ... Now the code crashes when run in the target.
Just whilst playing around getting this stuff to work, I've taken one subroutine and moved it into the 'Banked' memory. Everything else has remained as it was.
I've changed the 'JSR' to be a 'CALL' - and the 'RTS' which terminates the subroutine has been changed to a 'RTC'
It all downloads into the target with no errors - and you can run it - all appears fine - the routine that has been moved is being called (I know this because it toggles the state of an LED !)
GREAT ! I thought - I was wrong....
I connect the PC to the SCI port and run the application which provides the GUI for the target when used in the real world - the target goes off into the weeds - the Debugger shows 'Unknown Event'
So - I commented out the 'CALL' to the routine - so it's still in the code at the same address location in the banked memory, just never gets called - now it doesn't crash.
Next - I put the call back in - but the first line of the subroutine is RTC - so the call is made, but nothing is done - now it does crash.
At this point I'm currently stuck !
Andy