I'm using KDS 3.0 to debug a FRDM-K64F under Ubuntu 14.04 and when I plug in the usb cable I do NOT see a mass storage device. I'm supposed to see one named K64F. This has not been a problem because I have been debugging out of KDS 3.0 with the Segger connection and it works fine. Getting closer to deployment though, I need to run the board stand-alone but the code won't work unless it's running in a debug session.
Flashing it from inside KDS doesn't work so I went to drop the .bin file onto the msd but it's not there. I tried the P&E Micro connection but it won't show an msd either. I feel trapped in a box! In desperation I wrote this description of the problem on the web forum so hopefully someone can help me!
Well I found the mbed OpenSDA and dropped it onto bootloader and now I can see an msd named mbed. I tried dropping my raw binary .bin file onto there but that didn't work. The .bin file builds way faster and it looked like I was able to flash it from inside kds 3.0. Everything worked for a moment and I could run my app without being connected to the debugger but then I lost it all and ended up reinstalling kds 3.0. That cured a lot of problems except for this when I do a build:
make all
Building target: k64irst.elf
Invoking: Cross ARM C++ Linker
arm-none-eabi-g++ -mcpu=cortex-m3 -mthumb -O2 -g -Wl,-Map,"k64irst.map" -specs=rdimon.specs -o "k64irst.elf" ./Sources/Events.o ./Sources/exit.o ./Sources/main.o ./Project_Settings/Startup_Code/startup.o ./Generated_Code/System/CPU_Init.o ./Generated_Code/System/Peripherals_Init.o ./Generated_Code/System/Vectors.o ./Generated_Code/Peripherals/PIT_Init.o ./Generated_Code/BitIoLdd1.o ./Generated_Code/BitIoLdd2.o ./Generated_Code/BitIoLdd4.o ./Generated_Code/BitIoLdd5.o ./Generated_Code/BitIoLdd6.o ./Generated_Code/BitIoLdd7.o ./Generated_Code/BitIoLdd8.o ./Generated_Code/Blew.o ./Generated_Code/Cpu.o ./Generated_Code/DA1.o ./Generated_Code/EInt1.o ./Generated_Code/ExtIntLdd1.o ./Generated_Code/ExtIntLdd2.o ./Generated_Code/Grene.o ./Generated_Code/PE_LDD.o ./Generated_Code/PWM1.o ./Generated_Code/PWM2.o ./Generated_Code/PWM3.o ./Generated_Code/PWM4.o ./Generated_Code/PWM5.o ./Generated_Code/PWM6.o ./Generated_Code/Pins1.o ./Generated_Code/PpgLdd1.o ./Generated_Code/Pulse.o ./Generated_Code/PwmLdd1.o ./Generated_Code/PwmLdd2.o ./Generated_Code/PwmLdd3.o ./Generated_Code/PwmLdd4.o ./Generated_Code/PwmLdd5.o ./Generated_Code/PwmLdd6.o ./Generated_Code/Swint2.o ./Generated_Code/Swit3.o ./Generated_Code/TU1.o ./Generated_Code/roDown.o ./Generated_Code/roUp.o ./Generated_Code/strobe.o ./Generated_Code/testOut.o
./Project_Settings/Startup_Code/startup.o: In function `zero_fill_bss':
/home/david/workspace.kds/k64irst/Debug/../Project_Settings/Startup_Code/startup.c:180: undefined reference to `__SP_INIT'
/home/david/workspace.kds/k64irst/Debug/../Project_Settings/Startup_Code/startup.c:180: undefined reference to `__END_BSS'
/home/david/workspace.kds/k64irst/Debug/../Project_Settings/Startup_Code/startup.c:180: undefined reference to `__START_BSS'
./Generated_Code/System/Vectors.o:(.vectortable+0x0): undefined reference to `__SP_INIT'
collect2: error: ld returned 1 exit status
make: *** [k64irst.elf] Error 1
Those undefined references to __SP_INIT and the others are externs and I can't see where they are actually defined. Any ideas?
I opened a second project that was known to work and I went to the Project->Settings pages for each one and copied the values from the known good one to the troubled project. And it worked! Whew! These hundreds of kds settings are very fragile and it's easy to lose your way.
Hi Dave,
Seems you could fix the problem. Could you share some experience about this issue especially under Linux OS.
Thank you for your generous.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------