Skip to content

Commit

Permalink
Merge 6fb1828 into 4a321fe
Browse files Browse the repository at this point in the history
  • Loading branch information
ATmobica authored Oct 6, 2021
2 parents 4a321fe + 6fb1828 commit 2047992
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 39 deletions.
10 changes: 8 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed",
"armToolchainPath": "${env:PW_ENVIRONMENT_ROOT}/cipd/pigweed/bin/", // Pigweed environment bootstraping required
"executable": "./build-CY8CPROTO_062_4343W/${input:mbedDebugProfile}/chip-mbed-${input:mbedApp}-example",
"openocdPath": "${env:OPENOCD_PATH}/bin",
"servertype": "openocd",
"searchDir": [
"${workspaceRoot}/config/mbed/scripts",
"${env:OPENOCD_PATH/scripts}"
"${env:OPENOCD_PATH}/scripts"
],
"configFiles": ["CY8CPROTO_062_4343W.tcl"],
"overrideLaunchCommands": [
Expand All @@ -121,6 +123,7 @@
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed",
"armToolchainPath": "${env:PW_ENVIRONMENT_ROOT}/cipd/pigweed/bin/", // Pigweed environment bootstraping required
"executable": "./build-CY8CPROTO_062_4343W/${input:mbedDebugProfile}/chip-mbed-${input:mbedApp}-example",
"servertype": "external",
"gdbTarget": "host.docker.internal:3334", //port 3333 for the CM0+, 3334 for the CM4
Expand All @@ -147,11 +150,13 @@
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed",
"armToolchainPath": "${env:PW_ENVIRONMENT_ROOT}/cipd/pigweed/bin/", // Pigweed environment bootstraping required
"executable": "./build-CY8CPROTO_062_4343W/${input:mbedFlashProfile}/chip-mbed-${input:mbedApp}-example",
"openocdPath": "${env:OPENOCD_PATH}/bin",
"servertype": "openocd",
"searchDir": [
"${workspaceRoot}/config/mbed/scripts",
"${env:OPENOCD_PATH/scripts}"
"${env:OPENOCD_PATH}/scripts"
],
"configFiles": ["CY8CPROTO_062_4343W.tcl"],
"overrideLaunchCommands": [
Expand All @@ -170,6 +175,7 @@
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed",
"armToolchainPath": "${env:PW_ENVIRONMENT_ROOT}/cipd/pigweed/bin/", // Pigweed environment bootstraping required
"executable": "./build-CY8CPROTO_062_4343W/${input:mbedFlashProfile}/chip-mbed-${input:mbedApp}-example.hex",
"servertype": "external",
"gdbTarget": "host.docker.internal:3334", //port 3333 for the CM0+, 3334 for the CM4
Expand Down
33 changes: 2 additions & 31 deletions integrations/docker/images/chip-build-mbed-os/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,10 @@ RUN set -x \
&& rm -rf /var/lib/apt/lists \
&& : # last line

# ------------------------------------------------------------------------------
# Install Mbed-OS sources
RUN set -x \
&& (mkdir -p /opt/mbed-os \
&& cd /opt/mbed-os \
&& wget --progress=dot:giga https://github.com/ARMmbed/mbed-os/archive/mbed-os-6.7.0.tar.gz \
&& tar --strip-components=1 -xzf mbed-os-6.7.0.tar.gz \
&& rm mbed-os-6.7.0.tar.gz) \
&& : # last line

# ------------------------------------------------------------------------------
# Install Python modules
RUN set -x \
&& pip3 install --no-cache-dir -U mbed-cli mbed-tools \
&& pip3 install --no-cache-dir --ignore-installed -r /opt/mbed-os/requirements.txt \
&& : # last line

# ------------------------------------------------------------------------------
# Install ARM Toolchain (gcc-arm-none-eabi-9-2019-q4)
RUN set -x \
&& (mkdir -p /opt/mbed-os-toolchain \
&& cd /opt/mbed-os-toolchain \
&& wget --progress=dot:giga https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 \
&& tar -xjf gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 \
&& rm gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 \
&& : ) # last line

# ------------------------------------------------------------------------------
# Configure mbed build system
RUN set -x \
&& mbed config -G GCC_ARM_PATH /opt/mbed-os-toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/ \
&& mbed toolchain -G -s GCC_ARM \
&& : # last line

# ------------------------------------------------------------------------------
Expand All @@ -61,8 +33,7 @@ RUN set -x \

# ------------------------------------------------------------------------------
# Configure environment variables
ENV MBED_GCC_ARM_PATH=/opt/mbed-os-toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/
ENV MBED_OS_PATH=/opt/mbed-os/
ENV OPENOCD_PATH=/opt/openocd/
ENV PW_ENVIRONMENT_ROOT=/home/vscode/pigweed/env

ENV PATH="${PATH}:${MBED_GCC_ARM_PATH}:${OPENOCD_PATH}/bin"
ENV PATH="${PATH}:${OPENOCD_PATH}/bin"
4 changes: 0 additions & 4 deletions integrations/docker/images/chip-build-vscode/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ COPY --from=nrf /opt/NordicSemiconductor/nrfconnect /opt/NordicSemiconductor/nrf
COPY --from=android /opt/android/sdk /opt/android/sdk
COPY --from=android /opt/android/android-ndk-r21b /opt/android/android-ndk-r21b

COPY --from=mbedos /opt/mbed-os /opt/mbed-os
COPY --from=mbedos /opt/mbed-os-toolchain/ /opt/mbed-os-toolchain/
COPY --from=mbedos /opt/openocd/ /opt/openocd/

COPY --from=p6 /opt/ModusToolbox /opt/ModusToolbox
Expand Down Expand Up @@ -54,8 +52,6 @@ ENV ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
ENV EFR32_BOARD=BRD4161A
ENV ANDROID_HOME=/opt/android/sdk
ENV ANDROID_NDK_HOME=/opt/android/android-ndk-r21b
ENV MBED_GCC_ARM_PATH=/opt/mbed-os-toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/
ENV MBED_OS_PATH=/opt/mbed-os/
ENV OPENOCD_PATH=/opt/openocd/
ENV PW_ENVIRONMENT_ROOT=/home/vscode/pigweed/env
ENV TELINK_ZEPHYR_BASE=/opt/telink/zephyrproject/zephyr
Expand Down
2 changes: 1 addition & 1 deletion integrations/docker/images/chip-build/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.11
0.5.12
2 changes: 1 addition & 1 deletion scripts/examples/mbed_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,5 @@ if [[ "$COMMAND" == *"flash"* ]]; then
MBED_FLASH_SCRIPTS_PATH=$CHIP_ROOT/config/mbed/scripts

# Flash application
openocd -f "$MBED_FLASH_SCRIPTS_PATH/$TARGET_BOARD".tcl -c "program $BUILD_DIRECTORY/chip-mbed-$APP-example verify reset exit"
"$OPENOCD_PATH"/bin/openocd -f "$MBED_FLASH_SCRIPTS_PATH/$TARGET_BOARD".tcl -c "program $BUILD_DIRECTORY/chip-mbed-$APP-example verify reset exit"
fi

0 comments on commit 2047992

Please sign in to comment.