Hi Ppl.
I've been muddling thru a whole slew of problems with a bootloader.
The biggest pain in my @$$ is that anytime I try to relocate the interrupt vector, interrupts dont work.
I simplified everything down to a single test project. UART and TMR3 intrps.
Original Intrpt and Prog Start specs (0x00) works fine, but anytime I attempt to relocate my project. They simply dont work.
I follow the KB thread about relocating in C changing the required 3 settings: Int Vect change, startup.a51 change, and CODE SPACE linker change for my prog.
Any ideas why?
Additionally, when getting back to the bootloader proj: Can i compile the 0-0x1000 BOOTLOAD with NOINTVECT if I use no intrpts and at the same time, be able to reprogram interrupt table with the bootloader?
Thanks Chris
Oh, missed one.
s/Thanks/10x/
Every other thread on this forum is a flame, so no surprise here.
Is it fulfilling treating others with condescension?
Would you believe I've read the manual, consulted the KB, searched the forums, tried educated guesses, and even spent the better part of my week (and weekend) on this problem as my normal work piles up around my desk?
I'm not asking you to do my homework. I want to understand why my problem exists and solve it.
No, every other thread on this forum is not a flame. Please scan through the 10 or 20 latest and return with percentages. Keep in mind that comments that we can't read any posted code because the original poster have forgotten the correct tags can't automatically be considered flames.
Since you have reduced your problem into a minimalistic sample program that shows the problem - maybe you should post that code here, to let people look at it.
I solved it thanks.
===================== For whatever reason (im sure someone can come up with one), I had problems when I tried setting all three addresses (int vector setting, startup.a51 CSEG, and CODE SPACE) to the same value.
I had to use the fakeints.a method and point to a physical address and set my INT VECT accordingly.
;------------------------------------------------------------------------------ ; FakeInts.a - Dummy Interrupt vectors for the Universal DownLoad Program ;------------------------------------------------------------------------------ ; To translate this file use A51 with the following invocation: ; ; A51 FakeInts.A //DnlBase Equ 1000H ; DownLoader base address AppBase Equ 4000H ; Application base address IntBase Equ 7B00H CSEG AT 0 Ljmp AppBase ; Start application IntVect Macro Num CSEG AT (8*Num+3) Ljmp IntBase+(8*Num+3) Endm IntVect 0 ; INT0 - External Interrupt IntVect 1 ; T0 - Timer 0 Interrupt IntVect 2 ; INT1 - External Interrupt IntVect 3 ; T1 - Timer 1 Interrupt IntVect 4 ; SP - Serial Port Interrupt IntVect 5 ; T2 - Timer 2 Interrupt IntVect 6 ; PCA - Programmable Capture Array Interrupt IntVect 7 ;Unused IntVect 8 ;Unused IntVect 9 ;Unused IntVect 10 ;Unused IntVect 11 ;Unused IntVect 12 ;Unused IntVect 13 ;Unused IntVect 14 ; TMR3 End
So why, when following the KB article on changing the interrupt vector, does it not work with all three addresses being the same (except in the case of 0x000)?
"So why, when following the KB article on changing the interrupt vector, does it not work..."
How about posting your code that followed this article? Maybe someone could spot where you're misinterpreting it, or where it misled you...?
I just tried to post it but its too long so....
The program, sets up clk, and crossbar, and TMR3 intrpt.
Then does nothing but toggle a port based on TMR3 overflow.
-----------------------------
The program is just too simple. Recall I have no problem with the program..... only when I attempt to relocate it using the KB article. The article only has 3 steps so its pretty unlikely I screwed it up this time.
Prog addr changed using: http://www.keil.com/support/docs/189.htm
Int Vector changed using: http://www.keil.com/support/docs/143.htm