Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ports/psoc6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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:
Expand Down
14 changes: 7 additions & 7 deletions tools/psoc6/dev-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
}
Loading