Hi,

and thanks for your help !

I finally found the schmurtz. It was not a misunderstanding of the sdcc principles  : the USB programmer on the host side was buggy and replaced each 0xff by 0x00 when flashing the device !
MOVFF FSR2L,POSTDEC1 (opcode cfd9 ffe5 became cfd9 00e5) and other MOVFF on SFR were especially impacted. That's why I had some stack corruption : the C prologues and epilogues were damaged on the device application side...

Now everything seems ok. USB functions and stack are shared between bootloader and application, and the control flow goes from the bootloader to the application (and vice versa) without any problem.

I will commit this first running version in the next few days (just the time to get the code and comments reasonably clean) : keep an eye on http://gforge.enseeiht.fr/projects/vasco/ if you are interested.

Pierre