diff --git a/ports/psoc6/README.md b/ports/psoc6/README.md index 5c154e3d2ec11..a5dbf62fcd7b3 100644 --- a/ports/psoc6/README.md +++ b/ports/psoc6/README.md @@ -6,7 +6,7 @@ This port is intended to run on Infineon PSoC™ 6 microcontrollers. The following port is using Infineon ModusToolbox™ to resolve the specific PSoC™ board resources and building flags. Before working with micropython: -1. Install [ModusToolbox](https://softwaretools.infineon.com/tools/com.ifx.tb.tool.modustoolbox?_ga=2.77665684.1651703860.1718094141-10754106.1710937391). Minimum version required is 3.0. +1. Install [ModusToolbox](https://softwaretools.infineon.com/tools/com.ifx.tb.tool.modustoolbox). **The required version is 3.0**. The version is currently fixed as some future versions are incompatible. 2. Run the following script from MicroPython repository root to add the required tools to the system PATH, and install the udev rules: @@ -16,6 +16,11 @@ If the ModusToolbox™ has not been installed in the default path (`~/ModusToolb source tools/psoc6/dev-setup.sh && toolchain_setup [mtb_path] +### MacOS + +> [!NOTE] +> If you are using MacOS, you need to install GNU make. The default make on Mac OS is BSD make, which is not compatible with the Makefile used in this port. Remember to add GNU make to the system path PATH. + ## Building and running Linux version As we are working on the ports-psoc6-main branch (for now), first checkout that branch after cloning this repo: diff --git a/tools/psoc6/dev-setup.sh b/tools/psoc6/dev-setup.sh index 3639b82351eae..4df6551e77a7f 100644 --- a/tools/psoc6/dev-setup.sh +++ b/tools/psoc6/dev-setup.sh @@ -10,31 +10,31 @@ function set_mtb_tools_path { mtb_path=$1 - if [ "$mtb_path" = "" ]; then + if [ -z "$mtb_path" ]; then mtb_path=~/ModusToolbox fi - echo ${mtb_path}/tools_* + echo ${mtb_path}/tools_3.0 } function export_path { - mtb_tools_path=$(set_mtb_tools_path) + mtb_tools_path=$(set_mtb_tools_path "$1") export PATH=${mtb_tools_path}/openocd/bin:${mtb_tools_path}/library-manager:${mtb_tools_path}/fw-loader/bin/:${mtb_tools_path}/gcc/bin:$PATH } function install_udev_rules { - mtb_tools_path=$(set_mtb_tools_path) - ${mtb_tools_path}/openocd/udev_rules/install_rules.sh + mtb_tools_path=$(set_mtb_tools_path "$1") + test -f ${mtb_tools_path}/openocd/udev_rules/install_rules.sh && ${mtb_tools_path}/openocd/udev_rules/install_rules.sh } function toolchain_setup { mtb_path=$1 export_path ${mtb_path} - install_udev_rules + install_udev_rules ${mtb_path} } function git_add_ssh { ssh_key=$1 eval $(ssh-agent -s) ssh-add ${ssh_key} -} +} \ No newline at end of file