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

More Pointer Problems

Here's another good one. Again, works fine on simulator/debugger, but not on the target hardware.

If I do this:

BYTE process_Help(char *cmdBuffer) reentrant
{
cmdBuffer[0] = '\0';
printf( "Help Message");
return TRUE;
}

everything works fine. But if I do this:

BYTE process_Help(char *cmdBuffer) reentrant
{
char *strHelp = "Help Message";
cmdBuffer[0] = '\0';
printf(strHelp);
return TRUE;
}

it works fine on the simulator/debugger, but nothing is displayed when executed on the target hardware.

Any/All help welcome and appreciated.

Thanks,
Chris Beattie

Parents
  • This is what I'm doing in my startup.a51:

    IDATALEN	EQU	80H	; the length of IDATA memory in bytes.
    ;
    XDATASTART	EQU	0H	; the absolute start-address of XDATA mem
    XDATALEN	EQU	400H	; the length of XDATA memory in bytes.
    ;
    PDATASTART	EQU	0H	; the absolute start-address of PDATA memory
    PDATALEN	EQU	0H	; the length of PDATA memory in bytes.
    .
    .
    .
    IBPSTACK	EQU	1	; set to 1 if small reentrant is used.
    IBPSTACKTOP	EQU	0FFH+1	; set top of stack to highest location+1.
    ;
    .
    .
    .
    STARTUP1:
    ; Mask all interrupts.  We don't want any interrupts coming in while
    ; we are trying to start up.
    		MOV     IE, #0
    
    ; Specify that internal XDATA exists.
                    ANL     PMR, #0FCh    ; CLEAR DME0 & DME1
                    ORL     PMR, #01h     ; SET DME0
    
    ; Change priority of interrupts
                    SETB    PT1     ; Timer 1 High Priority
    
    ; Select fastest XDATA timing.
                    MOV     CKCON, #00H
    
    

    I'm honesty not sure what RTX51 Tiny is, so I'm not sure if I'm using it.

    I am using Small Reentrant, if I need to specify a different RAMTOP, how would I go about doing so?

    Thanks,
    Chris Beattie

Reply
  • This is what I'm doing in my startup.a51:

    IDATALEN	EQU	80H	; the length of IDATA memory in bytes.
    ;
    XDATASTART	EQU	0H	; the absolute start-address of XDATA mem
    XDATALEN	EQU	400H	; the length of XDATA memory in bytes.
    ;
    PDATASTART	EQU	0H	; the absolute start-address of PDATA memory
    PDATALEN	EQU	0H	; the length of PDATA memory in bytes.
    .
    .
    .
    IBPSTACK	EQU	1	; set to 1 if small reentrant is used.
    IBPSTACKTOP	EQU	0FFH+1	; set top of stack to highest location+1.
    ;
    .
    .
    .
    STARTUP1:
    ; Mask all interrupts.  We don't want any interrupts coming in while
    ; we are trying to start up.
    		MOV     IE, #0
    
    ; Specify that internal XDATA exists.
                    ANL     PMR, #0FCh    ; CLEAR DME0 & DME1
                    ORL     PMR, #01h     ; SET DME0
    
    ; Change priority of interrupts
                    SETB    PT1     ; Timer 1 High Priority
    
    ; Select fastest XDATA timing.
                    MOV     CKCON, #00H
    
    

    I'm honesty not sure what RTX51 Tiny is, so I'm not sure if I'm using it.

    I am using Small Reentrant, if I need to specify a different RAMTOP, how would I go about doing so?

    Thanks,
    Chris Beattie

Children