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


  • Have you specified the proper configuration for SYSCON, BUSCONx registers in Monitor's CONFIG.INC?
    You might want to make sure that your board is working properly (write/read external memory, blink LEDs...) The MiniMon program can be very useful for that.
    Best luck!
    - Mike

  • Thanks Mike

    I have a working app which I can download to the flash (2* 128K on CS0 and CS1) with the DOS utility bloader. I know the board is working absolutely fine. I have replicated all the settings from the working apps's start.a66 into the monitors config.inc. What I dont understand is that I am telling the config.inc that I have 64K of RAM starting at address 40000H, yet the UV2 debugger is tring to write to address E7AAAA. ??

  • The monitor doesn't know how much RAM you have. It will try to download whatever code there is in the application. At first I thought that your application may have memory layout that does not fit into RAM. But 0xE7AAAA looks VERY strange, so no ideas at the moment...
    - Mike

  • The error is when UV2 is attempting to download the monitor code, the progress bar reaches 69% and then stops with the E7AAAA error. I have checked every parameter in the config.inc and I am absolutely stuck.
    Any help would be greatly appreciated

  • You can look at the code that downloads the monitor, it's in BOOT167.A66. Also check Monitor.M66 to make sure that memory layout of your monitor configuration looks as expected. Check serial communications with your board, you may need to lower the baudrate.
    Good luck!
    - Mike

  • Cheers for the help Mike.

    Here is a snippet of the m66 file.

    MEMORY MAP OF MODULE: Monitor (INST167)


    START STOP LENGTH TYPE RTYP ALIGN TGR GRP COMB CLASS SECTION NAME
    =====================================================================================
    000000H 000001H 000002H CODE REL WORD --- --- PRIV FCODE ?C_STI_INIT
    000002H 000003H 000002H CODE REL WORD --- --- PRIV FCODE ?C_STD_INIT
    000008H 00000BH 000004H --- --- --- --- --- --- * RESERVED MEMORY *
    0000ACH 0000AFH 000004H --- --- --- --- --- --- * RESERVED MEMORY *
    040000H --- 000000H DATA ABS AT.. --- --- PRIV M_DATA MON166_DATA_START
    040000H 0400A1H 0000A2H DATA REL WORD --- --- PUBL M_DATA MON166_W_DATA
    0400A2H 0400ADH 00000CH CODE REL WORD --- --- PRIV M_DATA MON166_EXEC
    0400AEH 0401B7H 00010AH DATA REL BYTE --- --- PUBL M_DATA MON166_B_DATA
    040800H 040863H 000064H CODE ABS AT.. --- --- PRIV --- INIT_CODE
    040864H 0418A5H 001042H CODE REL WORD --- --- PUBL --- MON166_CODE
    0418A6H 041A27H 000182H CODE REL WORD --- --- PUBL --- MON166_CONST


    I think it looks fine. Any more suggestions ?

  • 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

  • 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.