From: <lh...@ua...> - 2005-04-20 15:38:11
|
Felix, Is there a way for the user application to pass control back to the bootloader? I do a similar thing with two pieces of code, but I intentionally reset the stack pointer at the beginning of the user application since control cannot pass back to the bootloader. Would a similar scheme work for your project? Lon -----Original Message----- From: Felix Brack [mailto:fb...@lt...] Sent: Wednesday, April 20, 2005 10:33 AM To: SDCC Subject: [Sdcc-user] Preventing SDCC from initializing stack pointer Hello, I have an 8051 based hardware running 2 'programs': a firmware and a user application. The firmware is run from EPROM, the user application can be downloaded (by the help of the firmware) to a FLASH memory. When the user application is downloaded, the firmware boot's it. As my firmware (compiled with SDCC) already initializes the 8051's stack pointer, I need to tell SDCC not to 'touch' the SP when I build a user application. The 'problem' is the following code generated by SDCC: .area GSINIT (CODE) .area GSFINAL (CODE) .area GSINIT (CODE) __sdcc_gsinit_startup: mov sp,#__start__stack - 1 lcall __sdcc_external_startup mov a,dpl jz __sdcc_init_data ljmp __sdcc_program_startup I just need to suppress the instruction loading the stack pointer. Does anyone know how this is done? many thanks, Felix ------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728 _______________________________________________ Sdcc-user mailing list Sdc...@li... https://lists.sourceforge.net/lists/listinfo/sdcc-user |