Skip to content

Commit

Permalink
examples/usercimaimodule/imagimob: Update doc and mior fix in Makefile.
Browse files Browse the repository at this point in the history
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
  • Loading branch information
NikhitaR-IFX authored and actions-user committed Dec 12, 2024
1 parent e82450c commit 30bc22b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
21 changes: 19 additions & 2 deletions examples/usercimaimodule/imagimob/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,24 @@ Currently the existing sample model files are generated for [Human Activity Reco

## Installation

Please check for the pre-requisites mentioned [here](https://github.com/Infineon/micropython/tree/ports-psoc6-main/ports/psoc6#pre-requisites).
### Dependencies

- WSL (Windows Subsystem Layer)
- USBIPD
- ModusToolbox (version 3.0)
- MicroPython project with psoc6 port enabled

The development environment for the project is [WSL](https://learn.microsoft.com/en-us/windows/wsl/install). Please follow the steps in link to get WSL ready. Additionally [usbip](https://learn.microsoft.com/en-us/windows/wsl/connect-usb) installation should be done to allow accessing psoc device within WSL.

Please ensure to follow the pre-requisites mentioned [here](https://github.com/Infineon/micropython/tree/ports-psoc6-main/ports/psoc6#pre-requisites) and get the required installation.

By now, all the required installations should be working.

## Usage

Follow the steps below to generate micropython bindings for your imagimob generated model.

1. The imagimob micropytthon integration is available in imai-mp-integration, so checkout to that branch after cloning this repository.
1. Clone the repository and switch to ports-psoc6-main branch.

git clone https://github.com/Infineon/micropython.git

Expand All @@ -33,6 +44,12 @@ Follow the steps below to generate micropython bindings for your imagimob genera

make mtb_init BOARD=<board-name>

where board-name is your target device. Currently following boards are supported:

- CY8CKIT-062S2-AI
- CY8CPROTO-062-4343W
- CY8CPROTO-063-BLE

3. Retrieve submodules:

make submodules
Expand Down
1 change: 0 additions & 1 deletion examples/usercimaimodule/imagimob/imai_mp_iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ static mp_obj_t dequeue(mp_obj_t data_out_obj) {
if (result == 0) {
return MP_OBJ_NEW_SMALL_INT(result);
} else if (result == -1) {
mp_printf(&mp_plat_print, "No data is currently available\n");
return MP_OBJ_NEW_SMALL_INT(result);
} else if (result == -2) {
mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("Internal memory allocation error"), result);
Expand Down
2 changes: 1 addition & 1 deletion ports/psoc6/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ifeq ($(MICROPY_PSOC6_LWIP),1)
endif

LD = arm-none-eabi-gcc
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mcpu=cortex-m4 -msoft-float -fsingle-precision-constant -Wdouble-promotion -Wfloat-conversion -UMICROPY_USE_INTERNAL_PRINTF
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mcpu=cortex-m4 -msoft-float -fsingle-precision-constant -Wdouble-promotion -Wfloat-conversion -UMICROPY_USE_INTERNAL_PRINTF -Wno-error=float-conversion

# std=c11 instead of std=c99 : provides "static_assert" (not available in c99)
# -D_XOPEN_SOURCE=700 : makes sure the setenv/unsetenv headers are included
Expand Down
2 changes: 1 addition & 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://www.infineon.com/cms/en/design-support/tools/sdk/modustoolbox-software/). Minimum version required is 3.0.
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.

2. Run the following script from MicroPython repository root to add the required tools to the system PATH, and install the udev rules:

Expand Down

0 comments on commit 30bc22b

Please sign in to comment.