1. is it possible to flash the bootloader in the protected section of ROM?
I want to make a application in C for the bootloader code which can flash a application program via CAN bus.
of course you can. and in my opnion, you have to. i have write a bootload in C and it works fine. you can use a .prm file to indicate where you want to locate your code.
2. How is it possible to flash the user application to another ROM-Adress (unprotected)?
first, you move your "flashing code"(i mean the code which carrys out the task of flash) into ram, and run it from ram. that is the most important thing for the bootloader.
3. How can I jump from user application to bootloader and from bootloader to user application?
my work is like this: the original reset vector points to the bootloader, and the relocated reset vector points to the application. so when the CPU reset, it first enters the bootloader mode, and when it exits this mode, the SP load the relocated reset vector and RTS
4. Can I flash two different programms with P&E micro USB Multilink interface? This is for testing the jumps between user application and bootloader. How should I do this? What files have to be adjusted
i have not tried this method, however, i do not think this will work, unless these two programs are located in to different space in flash, and all this code are in only one SX or S19 file
5. Do you know other issues I have to take care about (Interrupt vector table relocation, .prm-file modifications)?
the dz60 support relocation of interrupt vector, you just need to define where it should go
My idea is to programm a bootloader and locate it into a protected area of the Flash ROM with PE micro. When a user application is developed it should be possible to flash it into the unprotected area of Flash ROM also using PE micro but without overwriting the bootloader.
i am not sure if you could do this. when i use a PE micro, it always ereases the entile flash. so i just debug the application, and download it into flash using the bootloader.
I read AN 2295 but I don't have experience with assembler code. The application will be programmed in C.
actually, i write my bootload almost in C, but in some cases, such as jumping from bootloader to application and reset, i still have to using inline asm.
hope you can understand my poor english.