I’m getting two “ports” recognized by platformIO.
it auto selects the wrong port it seems, where I’m getting this error message:
Compiling .pio/build/lpc1768/src/main.o
Compiling .pio/build/lpc1768/libcb3/LPC17xx/core_cm3.o
Compiling .pio/build/lpc1768/libcb3/LPC17xx/system_LPC17xx.o
Archiving .pio/build/lpc1768/libcb3/libLPC17xx.a
Indexing .pio/build/lpc1768/libcb3/libLPC17xx.a
Linking .pio/build/lpc1768/firmware.elf
Checking size .pio/build/lpc1768/firmware.elf
Building .pio/build/lpc1768/firmware.bin
Memory Usage -> http://bit.ly/pio-memory-usage
DATA: [ ] 0.2% (used 124 bytes from 65536 bytes)
PROGRAM: [ ] 0.1% (used 424 bytes from 524288 bytes)
Configuring upload protocol...
AVAILABLE: blackmagic, cmsis-dap, jlink, mbed
CURRENT: upload_protocol = blackmagic
Looking for BlackMagic port...
Auto-detected: /dev/cu.usbmodem79AC68973
Uploading .pio/build/lpc1768/firmware.bin
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
Remote replied unexpectedly to 'vMustReplyEmpty': timeout
"monitor" command not supported by this target.
Don't know how to attach. Try "help target".
You can't do that when your target is `exec'
Section .init, range 0x8000 -- 0x800c: matched.
Section .text, range 0x800c -- 0x8148: matched.
Section .fini, range 0x8148 -- 0x8154: matched.
Section .rodata, range 0x8154 -- 0x8158: matched.
Section .ARM.exidx, range 0x8158 -- 0x8160: matched.
Section .eh_frame, range 0x8160 -- 0x8164: matched.
Section .init_array, range 0x18164 -- 0x18168: matched.
Section .fini_array, range 0x18168 -- 0x1816c: matched.
Section .data, range 0x1816c -- 0x181cc: matched.
The program is not being run.
when changing to the other port I’m getting this error message, as platformIO tried to upload the .bin file? When looking at the verbose output it seems to try to upload the correct .elf file, tho.
|-- <LPC17xx>
Compiling .pio/build/lpc1768/src/main.o
Compiling .pio/build/lpc1768/libcb3/LPC17xx/core_cm3.o
Compiling .pio/build/lpc1768/libcb3/LPC17xx/system_LPC17xx.o
Archiving .pio/build/lpc1768/libcb3/libLPC17xx.a
Indexing .pio/build/lpc1768/libcb3/libLPC17xx.a
Linking .pio/build/lpc1768/firmware.elf
Checking size .pio/build/lpc1768/firmware.elf
Building .pio/build/lpc1768/firmware.bin
Memory Usage -> http://bit.ly/pio-memory-usage
DATA: [ ] 0.2% (used 124 bytes from 65536 bytes)
PROGRAM: [ ] 0.1% (used 424 bytes from 524288 bytes)
Configuring upload protocol...
AVAILABLE: blackmagic, cmsis-dap, jlink, mbed
CURRENT: upload_protocol = blackmagic
Looking for BlackMagic port...
Use manually specified: /dev/cu.usbmodem79AC68971
Uploading .pio/build/lpc1768/firmware.bin
Target voltage: 3.3V
Available Targets:
No. Att Driver
1 ARM Cortex-M
warning: while parsing target memory map (at line 1): Required element <memory> is missing
0x4b07b508 in ?? ()
Loading section .init, size 0xc lma 0x8000
Load failed
Section .init, range 0x8000 -- 0x800c: MIS-MATCHED!
warning: One or more sections of the target image does not match
the loaded file
Section .text, range 0x800c -- 0x8148: MIS-MATCHED!
Section .fini, range 0x8148 -- 0x8154: MIS-MATCHED!
Section .rodata, range 0x8154 -- 0x8158: MIS-MATCHED!
Section .ARM.exidx, range 0x8158 -- 0x8160: MIS-MATCHED!
Section .eh_frame, range 0x8160 -- 0x8164: matched.
Section .init_array, range 0x18164 -- 0x18168: MIS-MATCHED!
Section .fini_array, range 0x18168 -- 0x1816c: MIS-MATCHED!
Section .data, range 0x1816c -- 0x181cc: MIS-MATCHED!
Kill the program being debugged? (y or n) [answered Y; input not from terminal]
available ports:
/dev/cu.usbmodem79AC68971
-------------------------
Hardware ID: USB VID:PID=1D50:6018 SER=79AC6897 LOCATION=20-2
Description: Black Magic Probe
/dev/cu.usbmodem79AC68973
-------------------------
Hardware ID: USB VID:PID=1D50:6018 SER=79AC6897 LOCATION=20-2
Description: Black Magic Probe
Seems to be related to this issue: LPC1768 Debugging Error