First time here so be gentle
Hardware: mikroMedia for Xmega. ATXMEGA128A1 rev H. (No relevant errata)
Debugger: JTagICE 3
Compiler: mikroPascal Pro v6.1.1
I was busy this weekend getting back to my MMB for XMega as I have found a project for it.
Long story short, I used the bootloader example project and it's first fault was that it used UARTC0 and not UARTF0 like it should. Fixed that and I got my gggg's in my terminal.
But every time I would program the bootloader, it would just loop, irrespective of the bootloader fuse.
Looking at the hex file it creates, it adds an interrupt vector jump table (Which I don't believe it should do).
The problem is that address 0x00000 jumps to 0x20000 and the bootloader jumps back to 0x00000. This will happen if the bootloader is programmed after the application.
(Yip, why program the bootloader after the application? Well because the hex file format provides that exact ability to program parts of memory without affecting other parts if it's right)
This makes no sense anyway as the bootloader fuse selects whether it should boot from 0x00000 (application) or 0x20000 (bootloader) and not the compiler.
The problem is the hex file output. It should not have a interrupt vector jump table. That is for the firmware application to decide. The boot select fuse is for the bootloader.
To reproduce: Select the bootloader option in edit project and disassemble the hex file produced to see the jump table.
I hope this enough information.