I have successfully converted the source code from the EZ-USB2 framework (from Cypress Semiconductor) so that I can use SDCC for development. Now everything looks good, my only problem right now is that obviously nobody cares about the generation of the reset vector.
Right now I've manually added code in one of my assembler modules so that __sdcc_gsinit_startup is used as the target for the reset jump. But should'nt that be done automatically by SDCC?
Thanks for your help,
Do you have a void main(void) function? Look in the generated asm for that file, it should contain the reset vector.
What command line options did you use?
Doesn't the EZ-USB unify code memory with xdata memory space? Did you account for that?
You are right, the main module contains
.area HOME (CODE)
My fault was that I translated all linker options from the KEIL linker to according SDCC options. KEIL uses a --code-loc of 0x0080 to make sure that no code will be placed within the first 128 bytes of code space, because the KEIL linker is able to "detect" the interrupt functions within the object decks and inserts the according vectoring jumps into the first 128 bytes of the code space.
SDCC however, expects that the object decks actually supply these vectoring code, so a --code-loc of 0x0000 must be used. Thanks a lot for pointing me to the right direction.
Have a nice weekend,
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.