![]() |
PIC16F1939 bootloader assitance - Printable Version +- ds30 Loader free edition forums (https://picbootloader.com/forum) +-- Forum: Support (https://picbootloader.com/forum/forumdisplay.php?fid=3) +--- Forum: 8-bit firmwares (https://picbootloader.com/forum/forumdisplay.php?fid=7) +--- Thread: PIC16F1939 bootloader assitance (/showthread.php?tid=22584) |
PIC16F1939 bootloader assitance - Ido - 2024-09-04 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" 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 When trying pack 1.6.241 xc8 2.41: Code: ::: error: (2096) undefined symbol "_main" (E:\TMP\xcBsis4.1\driver_tmp_6.o) 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! RE: PIC16F1939 bootloader assitance - Mikael Gustavsson - 2024-09-08 Hello, Please zip the complete MPLAB X IDE project and post it here and I will have a look. RE: PIC16F1939 bootloader assitance - bryan45 - 2024-10-22 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 ![]() RE: PIC16F1939 bootloader assitance - desainrumahminimalis - 2025-05-24 Troubleshooting ds30 Loader Build Issues in MPLAB X It looks like you're experiencing several issues when trying to build the ds30 loader project. Let me help you analyze and resolve these problems. Understanding the Errors With XC8 v1.31 and older device pack (1.2.63): The undefined symbols (EEADR, FSR, INDF, etc.) suggest the compiler isn't properly recognizing the PIC16F1938's special function registers. This typically happens when: The correct header files aren't being included There's a mismatch between the compiler version and device support With newer versions: The "undefined symbol _main" and "program entry point defined more than once" errors indicate the project configuration may need adjustment for newer compiler versions. Recommended Solutions Use compatible tool versions: The ds30 loader was likely developed for older XC8 versions Try using XC8 v1.45 or v2.00 (a middle ground between very old and very new) Use device pack version 1.3.231 if available Project configuration fixes: Right-click your project > Properties Under "XC8 linker", check "Use alternate settings" and add: --codeoffset=0x800 Ensure "Linker Heap" and "Linker Stack" sizes are set to 0 for bootloader projects Source code modifications: For the register errors, try adding at the top of user_code.inc: c #include <xc.h> #include <pic16f1938.h> For the entry point conflict, check if there are multiple definitions of main() or the reset vector Alternative approach: Try using the pre-built hex files that come with ds30 loader if available Contact ds30 support for version-specific build instructions Additional Tips Make sure you've selected the correct device (PIC16F1938) in project properties Clean the project (right-click > Clean) before rebuilding Check the ds30 loader documentation for any version-specific requirements Consider setting up a virtual machine with an older MPLAB X version (v5.xx) if you continue having issues The ds30 loader is known to work best with older toolchain versions, so persistence with version compatibility is key here. If you continue having issues, you might want to consider alternative bootloaders like Tiny Bootloader or the built-in USB HID bootloader if your application allows. |