And have come unstuck at the section: Building Debug Builds.
I enter the commands
cd firmware/main
make clean all program-dfu PLATFORM=photon MODULAR=n DEBUG_BUILD=y USE_SWD_JTAG=y APPDIR=../../tinkerbreak
*using the appropriate local directory
terminal buzzes away happily until it starts to build the target Tinkerbreak.elf
I get about 5 inches of building text before this:
../build/target/hal/platform-10//libhal.a(cellular_hal.o):/Users/billwatson/Documents/Particle/src/firmware/hal/src/electron/cellular_hal.cpp:22: first defined here
collect2: error: ld returned 1 exit status
make: *** [/Users/billwatson/Documents/Particle/src/Tinkerbreak/target/Tinkerbreak.elf] Error 1
Gah! I forgot to mention that I’m doing an electron build.
I have been moving the target folder to trash in between attempts, but I haven’t emptied it, might be worth a shot when I’m back in the saddle. Thank you
If you’re building for Election, the command should be:
make clean all program-dfu PLATFORM=electron MODULAR=n DEBUG_BUILD=y USE_SWD_JTAG=y
Definitely delete the target directory in tinkerbreak if you change the PLATFORM from photon to electron in the make command line. The other one probably won’t be necessary under normal circumstances.
I did change that to electron when I tried the build, I just quickly copy pasted the above for the post without realising.
Sorry again! Well I guess I’ll never get another chance to use this excuse, but it’s my first post
Thanks for your brain power rikkas7, and thanks for checking in Kyle.
Unfortunately the issue still exists.
Here’s what I’ve done
Removed the tinkerbreak/target and firmware/build/target folders.
Then from firmware/main entering
sudo make clean all program-dfu PLATFORM=electron MODULAR=n DEBUG_BUILD=y USE_SWD_JTAG=y APPDIR=../mydirectories/Tinkerbreak
Which returns:
../build/target/hal/platform-10//libhal.a(cellular_hal.o):/Users/billwatson/Documents/Particle/src/firmware/hal/src/electron/cellular_hal.cpp:22: first defined here
collect2: error: ld returned 1 exit status
make: *** [/Users/billwatson/Documents/Particle/src/Tinkerbreak/target/Tinkerbreak.elf] Error 1
Without the root command I get the following. not sure if this is related.
I’m just reading through the guide again and found a step where I needed external clarification. I remember mentally flagging it as a step where I may have messed up.
In the ‘build using local keychain’ section the following step was a bit confusing to me as I couldn’t find the ~./profile file.
The info I found was that ~/ means my user folder - e.g. /users/bill
There’s a .profile file in there that has that line in there.
The other /.profile file in my /etc folder has
# System-wide .profile for sh(1)
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi
I am experiencing the same problem as @billyboy. When building for PLATFORM=electron, all builds with any combination of MODULAR=n and/or DEBUG_BUILD=y are failing with the same error messages:
../build/target/system/platform-10//libsystem.a(system_network.o): In function HAL_NET_notify_can_shutdown': firmware/system/src/system_network_internal.h:550: multiple definition of HAL_NET_notify_can_shutdown'
firmware/hal/src/electron/cellular_hal.cpp:41: first defined here
../build/target/system/platform-10//libsystem.a(system_network.o): In function HAL_NET_notify_connected': firmware/system/src/system_network.cpp:69: multiple definition of HAL_NET_notify_connected'
../build/target/hal/platform-10//libhal.a(cellular_hal.o):firmware/hal/src/electron/cellular_hal.cpp:20: first defined here
../build/target/system/platform-10//libsystem.a(system_network.o): In function HAL_NET_notify_dhcp': firmware/system/src/system_network.cpp:84: multiple definition of HAL_NET_notify_dhcp'
../build/target/hal/platform-10//libhal.a(cellular_hal.o):firmware/hal/src/electron/cellular_hal.cpp:34: first defined here
../build/target/system/platform-10//libsystem.a(system_network.o): In function HAL_NET_notify_disconnected': firmware/system/src/system_network.cpp:74: multiple definition of HAL_NET_notify_disconnected'
../build/target/hal/platform-10//libhal.a(cellular_hal.o):firmware/hal/src/electron/cellular_hal.cpp:27: first defined here
I tried deleting the target folder of firmware/modules, build/target and in my project folder as well. I am able to compile just fine with MODULAR=y and DEBUG_MODE=n for PLATFORM=electron. Alternatively, I am also able to enable those options for PLATFORM=photon.
This happens in both command line and Eclipse. I have version 4.9.3 20150529 of arm-none-eabi-gcc, and am running Ubuntu 16.04.
What system firmware version tag are you building? I’ve done MODULAR=n DEBUG_BUILD=y for the Electron in the past, but I’ll try it with whatever version you’re building with.