Hot!DsPIC30F - Flash erase, write and read functions - problem with the library

Author
Shailashri
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2018/09/19 15:12:56
  • Location: 0
  • Status: offline
2018/09/20 09:08:06 (permalink)
0

DsPIC30F - Flash erase, write and read functions - problem with the library

Hello, my code which works perfectly fine with the simulator, doesn't work on the target (DsPIC30F6010A). As per the standard libraries reference manual (50001456j.pdf), I have included "libpic30.h" file as well included the libpic30-ekf.a via the project properties -> Libraries->C:\Program Files (x86)\Microchip\xc16\v1.35\lib\libpic30-elf.a.
 
Everything works perfectly fine with the simulator but it doesn't work on the target environment. I am unware of what I am doing wrong here.
 
Below are few options I tried
 
1. I tried including this library via Project Properties -> XC16 -> XC16-ld -> Libraries ,
Below is the string
--stack=16 --check-sections --data-init --pack-data --handles --isr --no-gc-sections --fill-upper=0 --stackguard=16 --library=libpic30-elf --library-path="C:/Program Files (x86)/Microchip/xc16/v1.35/lib" --no-force-link --smart-io -Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map" --report-mem
 
But I get the error->
nbproject/Makefile-default.mk:135: recipe for target 'dist/default/production/Dummy2.X.production.hex' failed
c:\program files (x86)\microchip\xc16\v1.35\bin\bin\..\bin/elf-ld.exe: cannot find -llibpic30-elf
nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[2]: *** [dist/default/production/Dummy2.X.production.hex] Error 255
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 18s)
 
2. Tried to rebuild the library from source folder using the batch file. But I get the unresolved error for the path. I looked into the batch file, I don't see any problems with the path.
 
Please let me know on how to resolve this problem.
#1

1 Reply Related Threads

    MBedder
    Circuit breaker
    • Total Posts : 6469
    • Reward points : 0
    • Joined: 2008/05/30 11:24:01
    • Location: Zelenograd, Russia
    • Status: offline
    Re: DsPIC30F - Flash erase, write and read functions - problem with the library 2018/09/20 13:56:28 (permalink)
    #2
    Jump to:
    © 2018 APG vNext Commercial Version 4.5