Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PIC16F1939 bootloader assitance
#4
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.
Reply


Messages In This Thread
PIC16F1939 bootloader assitance - by Ido - 2024-09-04, 16:49:27
RE: PIC16F1939 bootloader assitance - by bryan45 - 2024-10-22, 11:42:50
RE: PIC16F1939 bootloader assitance - by desainrumahminimalis - 2025-05-24, 02:20:55

Forum Jump:


Users browsing this thread: 1 Guest(s)