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

C code class info

I am trying to use app note 138 with one exception, I want to relocate C code, not assembly ....

I believe my source file name "sram_x.c" defines the section name as SRAM_X, my problem is defining the class name. Anyone know how to do this?

Jeff

Parents
  • My source looked like this

    #include <reg161.h> /* special function register C161 */
    #include <srom.h> /* allows code relocation to SRAM */
    #include <intrins.h>

    #pragma LARGE
    #pragma RENAMECLASS(FCODE=SRAM_CODE)

    void wait (void) { /* wait function */
    }

    void sram_code(void) {
    unsigned int i;
    while (1) {
    for (i=0;i<=0x40000;i++) {
    wait();
    }
    }
    }

    I remember seeing the error you posted and as I recall the port was not present on the C161, so I commented it out. Hope that helps.

    Jeff


Reply
  • My source looked like this

    #include <reg161.h> /* special function register C161 */
    #include <srom.h> /* allows code relocation to SRAM */
    #include <intrins.h>

    #pragma LARGE
    #pragma RENAMECLASS(FCODE=SRAM_CODE)

    void wait (void) { /* wait function */
    }

    void sram_code(void) {
    unsigned int i;
    while (1) {
    for (i=0;i<=0x40000;i++) {
    wait();
    }
    }
    }

    I remember seeing the error you posted and as I recall the port was not present on the C161, so I commented it out. Hope that helps.

    Jeff


Children
No data