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 Configuration

Hello NG,

I wanted to configure Monitor. So I followed the steps described in "/Keil/C166/Monitor/Readme.txt". I decided to use the UART ASC0 mode and put CODE_START in "Config.inc" to 000200H (rom, after the vectors). The problem is that there are no vectors (i.e. no jump to start at 0, no jump to NMI at 8, ...)
What I made wrong?

Thanks - Peter

  • Hello NG,<br>
    <br>
    I wanted to configure Monitor. So I followed the steps described in "/Keil/C166/Monitor/Readme.txt". I decided to use the UART ASC0 mode and put CODE_START in "Config.inc" to 000200H (rom, after the vectors). The problem is that there are no vectors (i.e. no jump to start at 0, no jump to NMI at 8, ...)<br>
    What I made wrong?<br>
    <br>
    Thanks - Peter<br>

  • Thanks for you helpful intention. But on your answer I recognize only my question. Please try again to type you answer.
    Bye - Peter

  • Hello Peter,
    ok, i will try it again:
    1.) You used the UART ASC0 mode, so you have to burn the Monitor into your ROM first. You've done this now? If so, next step.
    2.) If you use the UART ASC0 mode or Simulated Serial Mode you have to choose a monitor code start address on an 'even' adress. Not 200h !! Because the vectors you are missing will be written to the decided code start adress. So your vectors are at 200h instead of 00h ! Understanding? Ok, what to do now? Choose for example 00h for CODE_START. Now your vectors for the monitor are on the right place. But there is one problem: The monitor loads the application into the RAM. For proper work of the application you need the startadresses 00h to 200h for the vectors of your application. So there is a little trick. The boot-routine of your monitor changes the address-range of your chipselects. So, CS0 (ROM) gets the range 100000h to 200000h and the CS1 (RAM) gets the range 00h to 100000h. The vectors for the monitor are automaticaly copied to the RAM-adress. OK, now choosing the CODE_START:
    I have a board with two chipselects:
    CS0 -> ROM 256kB
    CS2 -> RAM 256kB
    I used Adresslines A0..A19 (1MB)
    In "config.inc" i choosed:

    %DEFINE (DATA_START) (03FE00H)
    %DEFINE (CODE_START) (0200000H)

    $SET (BUSCON2 = 1)
    %DEFINE (ADDRESS2) (00000H)
    %DEFINE (RANGE2) (256K)
    All other adresses apply to CS0, OK ?

    DATA_START comes into CS2 (at the end), CODE_START comes to 2MB, this is not adressable but it's what i mean with 'even'. The CPU will still adress this (in CS0) but the Adresslines will adress 00h. Now, you have to enter in the 'Options for target'-Dialog, Folder Output -> Offset: -0x200000. Now you have an monitor for burning into your ROM (Flash?). It's a little bit complicated but it works! Probably you can ask the keil support for more information ?
    Best regards,
    Daniel Vetter