ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Суббота
6 июля
186900 Топик полностью
Dany (26.03.2010 10:58, просмотров: 145) ответил MBedder на Все это можно (и нужно) написать по-людски - используя символические имена. Как размещать по адресам - см. выше (добавил). А вообще - бутлодыри надо писать без прерываний, тогда и с ремапом трахаться не придется
А в бутлодыре и нет прерываний. В нем только таблица адресов, все согласно описанию сделано и работает. PIC24F: As currently configured, the bootloader occupies the address range 0x0000 – 0x1400, which means it occupies the PIC24F reset, interrupt, and alternate interrupt vector locations. The bootloader firmware itself does not enable or use interrupts. In order to make interrupts available for use by the main application firmware, the interrupt vectors are effectively “remapped” by placing goto instructions at the actual vector locations. In other words: Address 0x0006 (OscillatorFailure interrupt vector), contains a “goto 0x1408”. Address 0x0008 (AddressError interrupt vector), contains a “goto 0x140C”. Etc. For example, if a OscillatorFailure interrupt is enabled and used by the main application firmware, the following will occur: 1. Main application enables the interrupt source. 2. Sometime later, the interrupt event occurs. 3. Microcontroller jumps to 0x0006. 4. Microcontroller executes a “goto 0x1408” 5. Microcontroller executes a “goto _OscillatorFailure” instruction that will jump to the appropriately defined interrupt handler (or the DefaultInterrupt if the interrupt handler is not defined. This jump is located in the modified linker (.gld) file that is used with the application.