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

intel hex file format change?

what has changed in the basic hex file output format moving from uvision 2 to uvision3 and 4?

i have several hex files from examples from keil and analog for my part and they work fine if i try to program the part, but now i open up uvision 4 and start a new program to do nothing but toggle one gpio and it doesnt work.

with nothing else in the program but toggling one io, it doesnt work. it all works in the simulator just fine but not in the part anymore.

so before the hex files worked fine and i could compile and write a blinky style program into my part and all was well, now it compiles and simulates fine but doesnt work.

are there some retarded hidden compiler options im missing, or what, all i know is when i write a program to toggle just this one io that was compiled in uvision 2 its fine and compiled in uvision4 it doesnt do anything.

Parents
  • #include <aduc7022.H>                             // Include ADuC7022 Header File
    
    
    void IRQ_Handler(void)__irq;
    void FIQ_Handler(void)__irq;
    void PAbt_Handler(void){};
    void DAbt_Handler(void){};
    void SWI_Handler(void){};
    void Undef_Handler(void){};
    
    
    
    int main (void)
    {
    
            // set up core clock frequency
            POWKEY1 = 0x01;
            POWCON = 0x00;
            POWKEY2 = 0xF4;
    
    
            // start all gpio out in mode 00, override below
            GP0CON = 0x00000000;
            GP1CON = 0x00000000;
            GP2CON = 0x00000000;
            GP3CON = 0x00000000;
            GP4CON = 0x00000000;
    
            // start all gpio to inputs, override below
            GP0DAT = 0x00000000;
            GP1DAT = 0x00000000;
            GP2DAT = 0x00000000;
            GP3DAT = 0x00000000;
            GP4DAT = 0x00000000;
    
            // Port 0 setup
            // p0.0 is not used
            // p0.1 is not used
            // p0.2 is not used
            // P0.3 is the charge hv+ output
            // p0.4 is the ok 2 charge signal input (ie IRQ0)
            // p0.5 is the diagnostics dwell interrupt  input (irq1)
            // p0.6 is the charge hv- output
            // p0.7 is not used on WP64D rev1 as the UART0 and I2C1 are now used (was rs232rx)
            GP0DAT = 0x48000000;
    
             // Port 2 setup
            // p2.0 is xtra output
            GP2DAT = 0x1010000;
    
            // set up uart
            COMCON0 = 0x80;                                 // Setting DLAB
            COMDIV0 = 0x88;                                 // Setting DIV0 and DIV1 to DL calculated
            COMDIV1 = 0x00;
            COMCON0 = 0x07;                                 // Clearing DLAB
            COMIEN0 = 0x01;
    
    
    
            IRQEN = 0x00004000;
            FIQEN = 0x00008000;
    
            while(1)
            {
                    GP2DAT ^= 0x010000;
            }
    
    }
    
    
    
    
    
    void IRQ_Handler(void)   __irq
    {
    int a;
    a = COMRX&0xFF; // clear buffer
            GP2DAT ^= 0x1010000;
            return;
    }
    
    void FIQ_Handler(void) __irq
    {  int a ;
            a = FIQSTA;
            GP2DAT ^= 0x1010000;
            return;
    }
    

    this is just a tiny example where i ripped out everything useful just to try and debug the compiler options. this is running on an Analog devices ADuC7022 using uvision4.03 running the eval version of the compiler, linker, hex converter, etc. v 4.0.0.728

    the only thing i can think of anymore is that there has been some change to the hex file creation or that i am missing some kind of compiler option.

    but as far as options go i cant find anything different from this version to what i was using before. the memory addresses are correct, even though it doesnt matter.

    there are some major differences in the startup.s vs the aduc702x.s startup files where the new version has a new syntax, and some other changes that it automatically loads,

Reply
  • #include <aduc7022.H>                             // Include ADuC7022 Header File
    
    
    void IRQ_Handler(void)__irq;
    void FIQ_Handler(void)__irq;
    void PAbt_Handler(void){};
    void DAbt_Handler(void){};
    void SWI_Handler(void){};
    void Undef_Handler(void){};
    
    
    
    int main (void)
    {
    
            // set up core clock frequency
            POWKEY1 = 0x01;
            POWCON = 0x00;
            POWKEY2 = 0xF4;
    
    
            // start all gpio out in mode 00, override below
            GP0CON = 0x00000000;
            GP1CON = 0x00000000;
            GP2CON = 0x00000000;
            GP3CON = 0x00000000;
            GP4CON = 0x00000000;
    
            // start all gpio to inputs, override below
            GP0DAT = 0x00000000;
            GP1DAT = 0x00000000;
            GP2DAT = 0x00000000;
            GP3DAT = 0x00000000;
            GP4DAT = 0x00000000;
    
            // Port 0 setup
            // p0.0 is not used
            // p0.1 is not used
            // p0.2 is not used
            // P0.3 is the charge hv+ output
            // p0.4 is the ok 2 charge signal input (ie IRQ0)
            // p0.5 is the diagnostics dwell interrupt  input (irq1)
            // p0.6 is the charge hv- output
            // p0.7 is not used on WP64D rev1 as the UART0 and I2C1 are now used (was rs232rx)
            GP0DAT = 0x48000000;
    
             // Port 2 setup
            // p2.0 is xtra output
            GP2DAT = 0x1010000;
    
            // set up uart
            COMCON0 = 0x80;                                 // Setting DLAB
            COMDIV0 = 0x88;                                 // Setting DIV0 and DIV1 to DL calculated
            COMDIV1 = 0x00;
            COMCON0 = 0x07;                                 // Clearing DLAB
            COMIEN0 = 0x01;
    
    
    
            IRQEN = 0x00004000;
            FIQEN = 0x00008000;
    
            while(1)
            {
                    GP2DAT ^= 0x010000;
            }
    
    }
    
    
    
    
    
    void IRQ_Handler(void)   __irq
    {
    int a;
    a = COMRX&0xFF; // clear buffer
            GP2DAT ^= 0x1010000;
            return;
    }
    
    void FIQ_Handler(void) __irq
    {  int a ;
            a = FIQSTA;
            GP2DAT ^= 0x1010000;
            return;
    }
    

    this is just a tiny example where i ripped out everything useful just to try and debug the compiler options. this is running on an Analog devices ADuC7022 using uvision4.03 running the eval version of the compiler, linker, hex converter, etc. v 4.0.0.728

    the only thing i can think of anymore is that there has been some change to the hex file creation or that i am missing some kind of compiler option.

    but as far as options go i cant find anything different from this version to what i was using before. the memory addresses are correct, even though it doesnt matter.

    there are some major differences in the startup.s vs the aduc702x.s startup files where the new version has a new syntax, and some other changes that it automatically loads,

Children