| View previous topic :: View next topic |
| Author |
Message |
Ttelmah
Joined: 11 Mar 2010 Posts: 20145
|
|
Posted: Sat Sep 26, 2026 11:02 am |
|
|
Er.
For PCH (PIC18), needs to be:
| Code: |
#fuses NONE
#build (reset=0x800, interrupt=0x0808)
#org 0x0000, 0x07FF{}
|
The loader_end+5 address is for PCM (PIC16's). |
|
 |
vtrx
Joined: 11 Oct 2017 Posts: 151
|
|
Posted: Fri Oct 02, 2026 6:09 pm |
|
|
I'm having a problem with the low-priority interrupt.
It isn't executing as it should.
| Code: | #define APP_INICIO 0x10C0
#build (reset=APP_INICIO, interrupt=APP_INICIO + 0x0008)
//#build(reset=0x10C0:0x10C7, interrupt=0x10C8:0x10FF)
#org 0x0000,APP_INICIO - 1{} |
In the bootloader:
| Code: | #define ENDERECO_APP 0x10C0
#define FLASH_FIM 0x8000 // p
#int_global
void high_isr_vector(void)
{
#asm
//GOTO ENDERECO_APP + 0x0008 //
GOTO 0x10C8
#endasm
}
#org 0x0018, 0x0027
void low_isr_vector(void)
{
#asm
//GOTO ENDERECO_APP + 0x018 //
GOTO 0x10D8
#endasm
} |
The registers are programmed with the correct values; the problem lies in the main application—it seems CCS isn't routing low-priority interrupts correctly. |
|
 |
vtrx
Joined: 11 Oct 2017 Posts: 151
|
|
Posted: Sat Oct 03, 2026 6:44 pm |
|
|
| I decided to place the bootloader at the end of the flash memory; this way, the main application can be compiled normally without modifications, making things easier. |
|
 |
|