Cannot complier in macOS

Hi,
I did follow the guidance to install the SDK (v4.0.3). Just a quick test using the blink example code, but I always got the error when complier the code. I even tried Arduino v2.1.0 but same result. Please advise how I can fix this issue.

My laptop is MacBook Air and macOS Monterey (v12.6.3)

Arduino: 1.8.19 (Mac OS X), Board: "AMB82-MINI, Disable, Disable, Disable, 2000000"

FQBN: realtek:AmebaPro2:Ameba_AMB82-MINI
Using board 'Ameba_AMB82-MINI' from platform in folder: /Users/keyneshsu/Library/Arduino15/packages/realtek/hardware/AmebaPro2/4.0.3
Using core 'ambpro2' from platform in folder: /Users/keyneshsu/Library/Arduino15/packages/realtek/hardware/AmebaPro2/4.0.3

/Users/keyneshsu/Library/Arduino15/packages/realtek/tools/ameba_pro2_tools/1.2.2.2/prebuild_macos /Users/keyneshsu/Library/Arduino15/packages/realtek/tools/ameba_pro2_toolchain/1.0.1-p1 {runtime.tools.ameba_pro2_toolchain2-1.0.1-p2.path} 1.0.1-p1 1.0.1-p2
/Users/keyneshsu/Library/Arduino15/packages/realtek/tools/ameba_pro2_tools/1.2.2.2/ino_validation_macos /private/var/folders/ff/62n6qt091n5f82fmqn_pwh1c0000gn/T/arduino/sketches/9AA3FC7722EB075ED7E2D0574746F177 /Users/keyneshsu/Library/Arduino15/packages/realtek/tools/ameba_pro2_tools/1.2.2.2
Traceback (most recent call last):
  File "ino_validation.py", line 63, in <module>
IndexError: list index out of range
[18238] Failed to execute script 'ino_validation' due to unhandled exception!

exit status 1

Compilation error: exit status 1

Thanks,
KC

Hi @khsu-tw, Arduino SDK v4.0.3 does not support MacOS. However, it will be supported in SDK v4.0.4 which will be releasing soon. Meanwhile, you can try to use our pre-release version v4.0.4-build20230601 in our dev branch for your usage. Simply add https://raw.githubusercontent.com/ambiot/ambpro2_arduino/dev/Arduino_package/package_realtek.com_amebapro2_early_index.json in your Arduino IDE preference.

You may like our page Ameba IoT Forum[RTL8722/RTL8195/RTL8710/...] | Facebook to get more updates for AMB82-Mini.

Hi Pammy,

Thanks for feedback.

Actually I saw the information lunched on Facebook and was tried to add the SDK link you provide, but I only seeing the formal release version (v4.0.3 is the latest version), but not seeing the beta version v4.0.4.

Is there any steps I missed?

Thanks,
KC

Pammy via Realtek Ameba IOT Developers Forum (AMB82 RTL8722 RTL8195 RTL8710 RTL8720 BW16 Development board) - IOT / MCU Solutions 瑞昱開發者論壇 開發板 开發者论坛 开發板 <notifications@ameba.discoursemail.com>於 2023年6月2日 週五,上午9:31寫道:

Hi @khsu-tw,

You can try adding this instead,

https://github.com/ambiot/ambpro2_arduino/raw/dev/Arduino_package/package_realtek.com_amebapro2_early_index.json

If you still could not see the pre release version, you may need to try to restart Arduino IDE.

Hi Pammy,

The link works to add v4.0.4 beta release, but still cannot pass the complie.
Does the beta release supports Mac M1 processor already?

FQBN: realtek:AmebaPro2:Ameba_AMB82-MINI
Using board 'Ameba_AMB82-MINI' from platform in folder: /Users/keyneshsu/Library/Arduino15/packages/realtek/hardware/AmebaPro2/4.0.4-build20230601
Using core 'ambpro2' from platform in folder: /Users/keyneshsu/Library/Arduino15/packages/realtek/hardware/AmebaPro2/4.0.4-build20230601

/Users/keyneshsu/Library/Arduino15/packages/realtek/tools/ameba_pro2_tools/1.2.5/prebuild_macos /Users/keyneshsu/Library/Arduino15/packages/realtek/tools/ameba_pro2_toolchain/1.0.1-p1 {runtime.tools.ameba_pro2_toolchain2-1.0.1-p2.path} 1.0.1-p1 1.0.1-p2
/Users/keyneshsu/Library/Arduino15/packages/realtek/tools/ameba_pro2_tools/1.2.5/ino_validation_macos /private/var/folders/ff/62n6qt091n5f82fmqn_pwh1c0000gn/T/arduino/sketches/6541DA30910C67CEE31655E95C983F81 /Users/keyneshsu/Library/Arduino15/packages/realtek/tools/ameba_pro2_tools/1.2.5
Traceback (most recent call last):
  File "ino_validation.py", line 63, in <module>
IndexError: list index out of range
[24233] Failed to execute script 'ino_validation' due to unhandled exception!

exit status 1

Compilation error: exit status 1

Screen Shot 2023-06-02 at 21.34.52

Thanks,
KC

@khsu-tw Yes, it already supports Mac M1 processor.

As I do not have access to my Mac now, I am unable to check on this beta version. You can try installing v4.0.4-build20230522 to see if you can compile through. Do let me know if you still could not get through the compilation. I will look into this matter as soon as I got access to Mac on Monday. Thank you!

Same errors after v4.0.4-build20230522 installed. You can try in your M1/M2 Mac next week.
However, I used a ESP32 board and used same example, the complier can be finished with no error. Just for your information.

Thanks,
KC

Hi @khsu-tw ,

Sorry for the late reply. I tried compiling v4.0.4-build20230601 on my Mac and its working fine. Do check your AmebaPro2 folder to see if there’s more than 1 SDK, by navigating to “Library”->“Arduino15”-> “packages” → “realtek” → “hardware” → “AmebaPro2”. Complication error will occur if there is more than 1 SDK in the folder.

Hi Pammy,

Thanks for the reply. I only have one SDK folder. See screenshot attached.

Thanks,
Keynes

Hi Pammy,

It works now, either build dated:20230522 or 20230601. But please don’t ask me how it works :smile:
I just change to other example projects and change back the original example Blink, re-run it and then it works.

However, I appreciate your full support on my questions.

Thanks,
Keynes

@khsu-tw ,

No problem! I’m glad it works. If you don’t mind, you can share what issue you faced that caused it to have complication error. It may also help other MacOS user, if they encounter the same issue as you :wink:

Hi Pammy,
Actually, I don’t really know what the exactly problem was. I removed the SDK, then re-install the SDK v20230522 per your instruction. After that I switch to another example code for a try, once confirm it can be complied with no error, then I switch back to the failure example code (Arduino example - Blink). Then the error is gone, sorry for that.

Thanks,
KC

No worries. Nevertheless Im glad it works :slight_smile: