Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PIC16F1939 bootloader assitance
#1
Hello,

This is my first time using any bootloader so my experience is very limited.
I downloaded the ds30 loader free edition and tried building the project found at "firmware_12F_16F_XC8" folder using  MPLAB X IDE v6.15
I am having trouble building the project even without making any changes(except putting a comment on "#error Do you need to configura uart pins to be digital? If not, remove this line")

When trying to build using the version mplab set(pack 1.2.63, xc8 v1.31) I get the following:
Code:
../src/user_code.inc:110:: error: (800) undefined symbol "EEADR"
../src/user_code.inc:132:: error: (800) undefined symbol "FSR"
../src/user_code.inc:134:: error: (800) undefined symbol "INDF"
../src/user_code.inc:211:: error: (800) undefined symbol "EEDATA"
../src/uart.inc:128:: error: (800) undefined symbol "SPBRG"
../src/uart.inc:135:: error: (800) undefined symbol "SPBRGH"
../src/uart.inc:137:: error: (800) undefined symbol "BAUDCTL"



When trying pack 1.6.241 and xc8 v1.31 :
Code:
"G:\Microchip\xc8\v2.31\bin\xc8-cc.exe" -c  -mcpu=16F1938  -D__DEBUG=1  -mdebugger=none  -mdfp="G:/Microchip/MPLABX/v6.15/packs/Microchip/PIC12-16F1xxx_DFP/1.6.241/xc8"  -fno-short-double -fno-short-float -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=default  -msummary=-psect,-class,+mem,-hex,-file  -ginhx32 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -mno-default-config-bits -std=c99 -gdwarf-3 -mstack=compiled:auto:auto  -o build/default/debug/_ext/1360937237/ds30loader.o  ../src/ds30loader.s
Non line specific message::: warning: (1020) unknown attribute "CONFIGPROG" in chipinfo file "G:/Microchip/MPLABX/v6.15/packs/Microchip/PIC12-16F1xxx_DFP/1.6.241/xc8\pic\dat\ini\16f1938.ini" at line 185
Non line specific message::: warning: (1020) unknown attribute "IDLOCPROG" in chipinfo file "G:/Microchip/MPLABX/v6.15/packs/Microchip/PIC12-16F1xxx_DFP/1.6.241/xc8\pic\dat\ini\16f1938.ini" at line 195
Non line specific message::: warning: (1020) unknown attribute "CONFIGPROG" in chipinfo file "G:/Microchip/MPLABX/v6.15/packs/Microchip/PIC12-16F1xxx_DFP/1.6.241/xc8\pic\dat\ini\16f1938.ini" at line 185
Non line specific message::: warning: (1020) unknown attribute "IDLOCPROG" in chipinfo file "G:/Microchip/MPLABX/v6.15/packs/Microchip/PIC12-16F1xxx_DFP/1.6.241/xc8\pic\dat\ini\16f1938.ini" at line 195
"G:\Microchip\xc8\v2.31\bin\xc8-cc.exe"  -mcpu=16F1938 -Wl,-Map=dist/default/debug/ds30Loader_12F_16F.X.debug.map  -D__DEBUG=1  -mdebugger=none  -DXPRJ_default=default  -Wl,--defsym=__MPLAB_BUILD=1  -mdfp="G:/Microchip/MPLABX/v6.15/packs/Microchip/PIC12-16F1xxx_DFP/1.6.241/xc8"  -fno-short-double -fno-short-float -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -msummary=-psect,-class,+mem,-hex,-file  -ginhx32 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -mno-default-config-bits -std=c99 -gdwarf-3 -mstack=compiled:auto:auto        -Wl,--memorysummary,dist/default/debug/memoryfile.xml -o dist/default/debug/ds30Loader_12F_16F.X.debug.elf  build/default/debug/_ext/1360937237/ds30loader.o   
Non line specific message::: warning: (1020) unknown attribute "CONFIGPROG" in chipinfo file "G:/Microchip/MPLABX/v6.15/packs/Microchip/PIC12-16F1xxx_DFP/1.6.241/xc8\pic\dat\ini\16f1938.ini" at line 185
Non line specific message::: warning: (1020) unknown attribute "IDLOCPROG" in chipinfo file "G:/Microchip/MPLABX/v6.15/packs/Microchip/PIC12-16F1xxx_DFP/1.6.241/xc8\pic\dat\ini\16f1938.ini" at line 195
Non line specific message::: warning: (1020) unknown attribute "CONFIGPROG" in chipinfo file "G:/Microchip/MPLABX/v6.15/packs/Microchip/PIC12-16F1xxx_DFP/1.6.241/xc8\pic\dat\ini\16f1938.ini" at line 185
Non line specific message::: warning: (1020) unknown attribute "IDLOCPROG" in chipinfo file "G:/Microchip/MPLABX/v6.15/packs/Microchip/PIC12-16F1xxx_DFP/1.6.241/xc8\pic\dat\ini\16f1938.ini" at line 195
:0:: error: (500) undefined symbols:
_main(E:\TMP\skek.o) start_initialization(E:\TMP\skek.o)
build/default/debug/_ext/1360937237/ds30loader.o:74:: error: (501) program entry point is defined more than once
(908) exit status = 1


When trying pack 1.6.241 xc8 2.41:
Code:
::: error: (2096) undefined symbol "_main" (E:\TMP\xcBsis4.1\driver_tmp_6.o)
::: error: (2096) undefined symbol "start_initialization" (E:\TMP\xcBsis4.1\driver_tmp_6.o)
build/default/debug/_ext/1360937237/ds30loader.o:70:: error: (501) program entry point is defined more than once


I am not really sure how to tackle the problem since I'm guessing this build has already been tested and works for other people and depending on the version I am using I keep getting different errors.
Any help will be appreciated!
Reply
#2
Hello,
Please zip the complete MPLAB X IDE project and post it here and I will have a look.
Reply
#3
It seems like you're facing version conflicts between your toolsets, especially the DFP and XC8 versions. Try using an older XC8 version (like 1.45) that matches the DFP version others have used successfully. Also, make sure to remove all duplicate "_main" definitions and check the dependencies.
Sometimes these errors happen due to improper memory configuration within different MPLAB versions, so check linker settings too Big Grin
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)