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

macOS M1 support? #44

Open
KenjutsuGH opened this issue May 29, 2023 · 3 comments
Open

macOS M1 support? #44

KenjutsuGH opened this issue May 29, 2023 · 3 comments

Comments

@KenjutsuGH
Copy link

Is there any way to use this core on a M1 Mac?

@KenjutsuGH
Copy link
Author

I made progress in modifying the package_at32_index.json file and installing AT32F4 support in Arduino for macOS M1. Here's a summary of the steps:

  1. I made changes to the package_at32_index.json file to include support for the M1 toolchain/compiler. For "Artery_ISP_Console", I copied the Linux entry, acknowledging that the Linux executable won't run on macOS. Here is my modified file: package_at32_index.json
  2. With the modifications in place, I was able to install AT32F4 support in the Arduino IDE for macOS.
  3. In the Arduino IDE, I enabled the verbose compile setting to obtain more detailed information during compilation.
  4. The second-to-last line before the memory usage information in the compilation output, provided a link to the compiled hex file. In my case, it was located at /var/folders/tq/dqrghm993td49tz1pvg8psxm0000gn/T/arduino_build_563977/MyFirstSketch.ino.hex.
  5. To flash the executable, I utilized openocd from ArteryTek. You can find the openocd releases on their GitHub repository. (ArteryTek openocd)
  6. Tested with ST-Link V2 and WeAct Mini Debugger DAPLink (APM32).
  7. For the DAPLink debugger, I executed the following command in the terminal: ./openocd -f interface/cmsis-dap-v2.cfg -f target/at32f403axx.cfg -c init -c "program /var/folders/tq/dqrghm993td49tz1pvg8psxm0000gn/T/arduino_build_563977/MyFirstSketch.ino.hex verify reset exit".

Now, if only ArteryTek can port their Linux version of Artery_ISP_Console to macOS...

@KenjutsuGH
Copy link
Author

I have added support for macOS on a M1 processor using OpenOCD as the upload method via a DAPLink adapter.

Please see here: https://github.com/KenjutsuGH/ArduinoCore-AT32F4

@KenjutsuGH
Copy link
Author

ST-Link was added via OpenOCD

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

1 participant