pic18f2321 reset vector wont build

Thread Starter

Dodgydave

Joined Jun 22, 2012
11,395
I am having trouble with a template in mpasm, it just wont build if i put the reset vector in like it says

org 0x000
goto main

i get these errors , so what is wrong???

Error[113] C:\PIC_PROGS\18F2321TEST.ASM 86 : Symbol not previously defined (main)
Error[118] C:\PIC_PROGS\18F2321TEST.ASM 86 : Overwriting previous address contents (0000)
Error[118] C:\PIC_PROGS\18F2321TEST.ASM 86 : Overwriting previous address contents (0001)
Error[118] C:\PIC_PROGS\18F2321TEST.ASM 86 : Overwriting previous address contents (0002)
Error[118] C:\PIC_PROGS\18F2321TEST.ASM 86 : Overwriting previous address contents (0003)
Halting build on first failure as requested.
 

MaxHeadRoom

Joined Jul 18, 2013
30,795
Well the first I would say is that you do not have a label 'main' or you have assigned it as 'Main' (capital M)?
Which of the two templates are you using?
Max.
 

JohnInTX

Joined Jun 26, 2012
4,787
Something, probably the template, has generated code at 0000h prior to your ORG. Your ORG resets the PC to 0000 and is clobbering that code. Search the .lst file for ORG and 0000 in the address field of the listing.
 
Top