Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with compiling for & flashing xenon on arch linux #14

Open
tve opened this issue Jan 21, 2019 · 1 comment
Open

Issues with compiling for & flashing xenon on arch linux #14

tve opened this issue Jan 21, 2019 · 1 comment

Comments

@tve
Copy link

tve commented Jan 21, 2019

(This is a summary of our discussion on gitter.im)

Issue 1

po xenon flash-beta fails for me on arch linux in the linker step:

tve@soumak /h/s/g/p/gps-test> po xenon flash-beta

          ______    ______
         /      \  /      \    Building firmware...
        /██████  |/██████  |
        ██ |  ██ |██ |  ██ |   Build Parameters:
        ██ |__██ |██ \__██ |     xenon
        ██    ██/ ██    ██/      gps-test
        ███████/   ██████/
        ██ |
        ██ |
        ██/  po xenon build gps-test

/home/tve/.po-util/bin/gcc-arm-embedded/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/bin/ld: cannot open linker script file module_user_memory.ld: No such
file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [../../../build/module.mk:235: /home/src/goobies/particle/gps-test/target/gps-test.elf] Error 1
make[1]: *** [../build/recurse.mk:12: modules/xenon/user-part] Error 2
make: *** [/home/tve/.po-util/src/particle.mk:46: flash-user] Error 2

This can be most easily fixed by adding the all target to the make invocations in particle.mk https://github.com/nrobinson2000/po/blob/master/share/particle.mk#L44-L54:

# Compile and flash the user part
flash-user: preprocess
        cd "${DEVICE_OS_PATH}/main" && make all program-dfu

# Compile and flash the user and system parts
flash-all: preprocess
        cd "${DEVICE_OS_PATH}/modules" && make all program-dfu

# Compile and flash debug build
flash-debug:
        cd "${DEVICE_OS_PATH}/main" && make all program-dfu MODULAR=n USE_SWD_JTAG=y

Issue 2

po dfu fails to find my xenon because I have another /dev/ttyACM device. This can be improved by changing the default setting of MODEM in https://github.com/nrobinson2000/po/blob/master/share/po-linux#L432-L435 to

for modem in /dev/ttyACM* /dev/serial/by-id/usb-Particle*; do
    if [ -e "$modem" ]; then
        MODEM="$modem"
        MODEM_DUO="$modem"
    fi
done

Thanks for creating po-util!!!

@nrobinson2000
Copy link
Owner

I've spent the last month creating neopo, a replacement for po-util written in Python. The issues you faced are now virtually nonexistent: the Particle makefile has been fixed, and neopo uses particle-cli to induce dfu mode with libudev.

Here is the repository:
https://github.com/nrobinson2000/neopo


While I currently don't have the Arch dependencies in the installer script yet, I will have them in there soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants