LPC1768 mbed board User Application will not run after being programmed with M1 MacBook Pro

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1768 mbed board User Application will not run after being programmed with M1 MacBook Pro

455 Views
ElectricRedPanda
Contributor I

Hello everyone,

First time making a post here. My college project is using this development board that uses the LPC1768. We've encountered this issue where when programming it with one of my partner's M1 MacBook Pro, the board does not seem to want to boot into the user application ~60% of the time. It boots fine with my Intel-based MacBook Pro. Based on my understanding, it seems to remain stuck in ISP mode or some kind of mode that allows serial communication, since we can type keys into the serial terminal and we see the light blink (which indicates that something is being transmitted over serial).

Our setup is using the PlatformIO IDE extension on VSCode to program, compile, and upload (I'm assuming it uses the standard toolchain). The upload protocol is mbed, which from what I can tell just places the binary onto the volume. The mbed is connected to the Mac with a USB-A-to-USB-mini? (or micro, I forget which one) and through a USB-C hub. This USB-C hub is able to program just fine with my machine.

We have not modified anything hardware-wise with it. According to the schematic, there should only be a 10k pull up to 3.3V. I find it unlikely that something would be shorting it to ground since it's in a breadboard and it works fine uploading to my computer.

The only hypotheses I currently have are:

  • something about the output power of the USB-C port on the M1 is weird and maybe the pin isn't pulled up to 3.3 V at the time the processor tries to boot (but I would find it weird for Apple to have an unreliable USB-C power output for their new macs)
  • I also read somewhere that if the checksum isn't valid, it also won't boot into the User Application, but.... why would the checksum be invalid some of the time, especially if the software doing the compiling and uploading is the same on both machines?

I'm sort of at a loss for what to do next. Any of you LPC experts have some ideas?

Labels (1)
Tags (3)
0 Kudos
2 Replies

399 Views
ElectricRedPanda
Contributor I

Thanks Bill! That does make me think it's some sort of driver issue with macOS Sonoma. I remember reading somewhere that when uploading to the board, the driver should calculate and patch in the CRC to the binary, which it seems to not be doing. So, basically, the mbed pipeline of just placing the binary file in the mbed volume is as of now broken for Apple Silicon Macs on Sonoma.

Luckily our board is equipped with CMSIS-DAP which does allow us to upload via OpenOCD / PyOCD (Python wrapper for OpenOCD that came equipped with PlatformIO). Some prerequisites though: you need to upgrade the firmware of the LPC1768 to version 141212, if it isn't already; also, if you're using PlatformIO, there's some issue with the pip dependencies for PyOCD and I couldn't figure out a way to fix that. So I just installed pyOCD separately, compiled the binary, and ran "pyocd load -t lpc1768 PATH/TO/BINARY/firmware.bin".

0 Kudos

426 Views
bvickerman
Contributor I

Sadly I have also experienced this issue.  My issue started when I upgraded my MacBook pro with an M1 processor to the Sonoma operating system.  Prior to the upgrade I had successfully compiled a program using the arm Keill studio using C++. I downloaded the binary file and it run it on the MBED LPC1768 board with no issues.  Next I upgraded the Mac Os  to the Sonoma operating system version 14.x.  After the update on the computer I recompiled the C++ program only changing a comment.  I loaded the binary file to the Mbed using a drag and drop as I had prior to the update.  This time the Mbed board did not run the code.  

I then tied the same thing on a windows system and there were no issues at all.  I also tried the same compile again on an older MacBook and no issues were experienced.  

I have also used the binary file compiled on the M1 computer and copied it to the iCloud, Using the older MacBook I dragged it the binary file from the iCloud to the Mbed board and it ran with no issues. 

If I take the board that was loaded from the M1 computer and then connect it to a non M1 computer the board still does not run.  

So far it looks like something has changed in the Somona Update that does something to the board when writing to it using the USB C.  The serial port communications work with no issues on a working Mbed board as long at the binary file was sent to the board from a windows computer or a computer that does not have the Sonoma operating system.

I have not had time to talk to Apple support regarding this issue.  

Sadly any MacBook computer that has the M series chip it can not have the OS downgraded.  

I am looking forward to seeing this issue resolved

Bill Vickerman

bvickerman@comcast.net

0 Kudos