We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, I have variables initialized at the global level in my .c file but they are never being initialized. When I watch in d-scope and INIT.a51 is executing: ?C_START: MOV DPTR,#?C_INITSEG LOOP: WATCHDOG CLR A MOV R6,#1 MOVC A,@A+DPTR JZ INITEND <------Here!!!!!!!!!! INC DPTR MOV R7,A ANL A,#3FH JNB ACC.5,NOBIG the code jumps right to INITEND because the MOVC instruction puts zero into the accumulator, even though I've initalized global variables with values. Anyone see the problem? Thanks, Bob
I ran into a problem where I had my c relocatable as the first parameter , and startup.obj as the second. When it was in this configuration, the reset vector was not listed as the first instruction in the .hex file. Putting startup .obj as the first parameter corrected this. Just my experience, hope it helps.