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

Monitor error 3

When I am using the monitor in boostrap mode I cannot sucessfully download code. I keep getting the error
*** MONITOR ERROR 3 : CANNTOT WRITE TO ADDRESS E7AAAA.
I am using an in house designed board with 64K RAM on CS2 at address 40000H.
I have set the followinging in config.inc
%DEFINE (DATA_START) (40000H)
%DEFINE (CODE_START) (42000H)
I have also Added the following reserve lines
8H-0BH, 0ACH-0AFH

Please help. I am at my wits end


Parents
  • I have also Added the following reserve lines
    8H-0BH, 0ACH-0AFH


    Those lines are supposed to be added not to the monitor's linker configuration, but to the application's. They prevent the application from using these memory areas because the monitor uses them as interrupt vectors. The monitor will not overwrite them during download anyway, so the RESERVE directive only prevents the warning.
    By the way, the interrupt vector table MUST be in RAM, otherwise the monitor in bootstrap mode simply will not work. You have to change your boards memory layout - the RAM area must start at 0. You will have to modify ADDRSELx registers.
    There may be other points that you are missing. Read Keil's documentation on Monitor166: Keil\C166\hlp\GS166.PDF, Keil\C166\MONITOR\README.TXT. Look through articles on Monitor166 in Keil's Support Knowledgebase:
    http://www.keil.com/support/index.asp?product=MON166&title=MON166%20Target%20Monitor

    It took me a while to get the monitor working first time: simply finding the working configuration can be very tricky.
    Regards,
    - Mike

Reply
  • I have also Added the following reserve lines
    8H-0BH, 0ACH-0AFH


    Those lines are supposed to be added not to the monitor's linker configuration, but to the application's. They prevent the application from using these memory areas because the monitor uses them as interrupt vectors. The monitor will not overwrite them during download anyway, so the RESERVE directive only prevents the warning.
    By the way, the interrupt vector table MUST be in RAM, otherwise the monitor in bootstrap mode simply will not work. You have to change your boards memory layout - the RAM area must start at 0. You will have to modify ADDRSELx registers.
    There may be other points that you are missing. Read Keil's documentation on Monitor166: Keil\C166\hlp\GS166.PDF, Keil\C166\MONITOR\README.TXT. Look through articles on Monitor166 in Keil's Support Knowledgebase:
    http://www.keil.com/support/index.asp?product=MON166&title=MON166%20Target%20Monitor

    It took me a while to get the monitor working first time: simply finding the working configuration can be very tricky.
    Regards,
    - Mike

Children
  • We have just had the same problem, but have tracked it down.

    We had defined a C-accessible variable in the mm310.a66 startup file, using the DW statement. DW creates an initialised variable - the monitor initialises it not the application. However, the monitor and application have different memory maps. The monitor was reading the location of the variable from the uploaded .h86 file, but whereas the monitor considered that location to be in external flash (and couldn't write there, hence the error), our application configures that to be in external SRAM.

    The solution was to use the DS statement instead of DW - this is an uninitialised variable so the monitor never tries to write to the external flash.