Skip to content

Commit a995430

Browse files
committed
oob: Fix OOB findings
* Install missing `libXcursor` package needed by Fast-models third party add-ons installer * Install missing `libncursesw5` package needed by arm-none-eabi-gdb * Install ninja build tool * Fix incorrect link for `container_post_startup.sh` in devcontainer.json * Improve documentation based on OOB feedback Signed-off-by: Devaraj Ranganna <[email protected]>
1 parent 2c555d0 commit a995430

File tree

8 files changed

+87
-21
lines changed

8 files changed

+87
-21
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,16 @@ RUN apt-get update && \
2929
liblzma-dev \
3030
libncurses5 \
3131
libncurses5-dev \
32+
libncursesw5 \
3233
libpython3.9-dev \
3334
libreadline6-dev \
3435
libsndfile1 \
3536
libsqlite3-dev \
3637
libssl-dev \
38+
libxcursor-dev \
3739
lzma \
3840
lzma-dev \
41+
ninja-build \
3942
pkg-config \
4043
python3.9 \
4144
python3-pip \

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
}
4343
},
4444
"remoteUser": "ubuntu",
45-
"postCreateCommand": "bash /workspaces/tmp-project-fri-devcontainer/tools/scripts/container_post_startup.sh",
45+
"postCreateCommand": "bash /workspaces/iot-reference-arm-corstone3xx/tools/scripts/container_post_startup.sh",
4646
"remoteEnv": {
4747
"PATH": "${containerEnv:PATH}"
4848
}

.github/.cSpellWords.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ ASYM
1313
BBOOL
1414
blinky
1515
Blinky
16+
buildx
1617
BWCAP
1718
CALIB
1819
cbor
@@ -138,6 +139,7 @@ Merkle
138139
Mfcc
139140
MFCC
140141
MFLN
142+
mlek
141143
mqtt
142144
mqttconfig
143145
Mqtt

.vscode/launch.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"gdbTarget": ":31627",
1515
"overrideLaunchCommands": [
1616
"-enable-pretty-printing",
17-
"load ${input:FRIApplication}.axf",
1817
"break main.c:main",
1918
"add-symbol-file iot_reference_arm_corstone3xx/components/security/trusted_firmware-m/integration/trusted_firmware-m-build-prefix/src/trusted_firmware-m-build-build/api_ns/bin/bl2.axf",
2019
"add-symbol-file iot_reference_arm_corstone3xx/components/security/trusted_firmware-m/integration/trusted_firmware-m-build-prefix/src/trusted_firmware-m-build-build/api_ns/bin/tfm_s.axf",

docs/applications/aws_iot/setting_up_aws_connectivity.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ AWS IoT Core authenticates device connections with the help of X.509 certificate
5656
and a certificate that's signed with this key.
5757
* Optionally you can specify metadata for the certificate. Use the ```-h``` flag for the Python script to see the available options.
5858
```bash
59-
python ./tools/scripts/generate_credentials.py --certificate_valid_time <validity duration in days > \
60-
--certificate_country_name <Country Name (2 letter code)> \
61-
--certificate_state_province_name <State or Province Name (full name)> \
62-
--certificate_locality_name <Locality Name (eg, city)> \
63-
--certificate_org_name <Organization Name (eg, company)> \
64-
--certificate_org_unit_name <Organizational Unit Name (eg, section)> \
65-
--certificate_email_address_name <Email Address> \
66-
--certificate_out_path <output path> \
67-
--private_key_out_path <output path>
59+
python3 ./tools/scripts/generate_credentials.py --certificate_valid_time <validity duration in days > \
60+
--certificate_country_name <Country Name (2 letter code)> \
61+
--certificate_state_province_name <State or Province Name (full name)> \
62+
--certificate_locality_name <Locality Name (eg, city)> \
63+
--certificate_org_name <Organization Name (eg, company)> \
64+
--certificate_org_unit_name <Organizational Unit Name (eg, section)> \
65+
--certificate_email_address_name <Email Address> \
66+
--certificate_out_path <output path> \
67+
--private_key_out_path <output path>
6868
```
6969
1. In the left navigation panel **Manager** section of the AWS IoT console,
7070
expand **Security**, and then select **Certificates**.

docs/development_environment/linux_dev_env.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313
git config --global user.email "email@address"
1414
git config --global user.name "User Name"
1515
```
16+
17+
* Installing CMake
18+
19+
```bash
20+
sudo apt update
21+
sudo apt install cmake -y
22+
```
23+
1624
* Setting up Python 3 virtual environment
1725

1826
```bash
@@ -97,3 +105,11 @@ argument, you should run:
97105
```
98106
git submodule update --init --recursive
99107
```
108+
109+
## Troubleshooting
110+
111+
* If the error `[MQTT Agent Task] DNS_ReadReply returns -11` is appearing, then
112+
try disabling DHCP in FreeRTOS TCP/IP stack:
113+
* In the file,
114+
`applications/<application_name>/configs/freertos_config/FreeRTOSIPConfig.h`,
115+
set `ipconfigUSE_DHCP` to value `0`

docs/development_environment/vscode_dev_env_build_and_debug.md

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ https://github.com/FreeRTOS/iot-reference-arm-corstone3xx
7171
* The VS Code window (instance) will reload, clone the source code, and start
7272
building the dev container. A progress notification provides status updates.
7373

74+
If building the container fails, then check the [troubleshooting](#troubleshooting)
75+
section for possible solutions.
76+
7477
Note:
7578
`zsh` and `ohmyzsh` is setup by default in the container. If you would like to
7679
use `bash`, then:
@@ -156,16 +159,33 @@ These options allow you to run reference applications in debug mode.
156159
* On the top right corner, click on `Downloads`
157160
* In the search window enter `FM000A`
158161
* Click on the search result `Fast Models (FM000A)`
159-
* Download `Third Party Add-ons for Fast Models` for your operating system
160-
* The `Third Party Add-ons for Fast Models` installer needs Graphical User
161-
Interface, therefore, if you are running the installer in VS Code devcontainer,
162-
then make sure X11 forwarding is working between devcontainer and host before
163-
running following the following:
164-
* copy downloaded ``Third Party Add-ons for Fast Models` to devcontainer
165-
(drag and drop from host to devcontainer)
166-
* tar -xzf FastModels_ThirdParty_IP_11-25_b15_Linux64_armv8l.tgz
167-
* cd FastModels_ThirdParty_IP_11-25_Linux64_armv8l
168-
* ./setup.bin
162+
* Download `Third Party Add-ons for Fast Models <version> on Linux`[AArch64/x86]
163+
based on the processor architecture of the machine
164+
* copy downloaded ``Third Party Add-ons for Fast Models` to devcontainer
165+
(drag and drop from host to devcontainer)
166+
167+
```bash
168+
tar -xzf FastModels_ThirdParty_IP_11-25_b15_Linux64[_armv8l].tgz
169+
cd FastModels_ThirdParty_IP_11-25_Linux64[_armv8l]
170+
./setup.bin --i-accept-the-end-user-license-agreement
171+
```
172+
173+
> Note:
174+
Using this option means you have read and accepted the terms and
175+
conditions of the End User License Agreement for the product and version
176+
installed.
177+
178+
NOTICE FOR SOFTWARE FILES DELIVERED BY ARM LIMITED FOR CONVENIENCE ONLY
179+
180+
THIS NOTICE ("NOTICE") IS FOR THE USE OF THE SOFTWARE ACCOMPANYING THIS
181+
NOTICE. ARM IS ONLY DELIVERING THE SOFTWARE TO YOU FOR CONVENIENCE ON
182+
CONDITION THAT YOU ACCEPT THAT THE SOFTWARE IS NOT LICENSED TO YOU BY ARM
183+
BUT THAT THE SOFTWARE IS SUBJECT TO A SEPARATE LICENSE. BY CLICKING
184+
"I AGREE" OR BY INSTALLING OR OTHERWISE USING OR COPYING THE SOFTWARE YOU
185+
INDICATE THAT YOU AGREE TO BE BOUND BY ALL THE TERMS OF THE INDIVIDUAL
186+
LICENSE AGREEMENTS OF THE SOFTWARE AND IF YOU DO NOT AGREE TO THE TERMS OF
187+
THIS NOTICE, ARM IS UNWILLING TO DELIVER THE SOFTWARE TO YOU AND YOU MAY
188+
NOT INSTALL, USE OR COPY THE SOFTWARE.
169189

170190
Once the installation is successful, the GDBRemoteConnection library can be
171191
found in
@@ -195,3 +215,28 @@ Run and Debug (Ctrl+Shift+D)
195215

196216
As soon as a debugging session starts, the DEBUG CONSOLE panel is displayed and
197217
shows debugging output.
218+
219+
## Troubleshooting
220+
221+
### Linux machines
222+
223+
* If building the container fails with:
224+
```
225+
ERROR [3/5] RUN apk add --no-cache git-lfs nodejs python3 npm make g++
226+
docker-cli docker-cli-buildx docker-cli-compose openssh-client-def
227+
```
228+
then, try turing VPN off and rebuild the container.
229+
* If the error `[MQTT Agent Task] DNS_ReadReply returns -11` is appearing even
230+
with VPN turned off, then try disabling DHCP in FreeRTOS TCP/IP stack:
231+
* In the file,
232+
`applications/<application_name>/configs/freertos_config/FreeRTOSIPConfig.h`,
233+
set `ipconfigUSE_DHCP` to value `0`
234+
235+
### Windows machines
236+
237+
* If building the container fails with:
238+
```
239+
ERROR [3/5] RUN apk add --no-cache git-lfs nodejs python3 npm make g++
240+
docker-cli docker-cli-buildx docker-cli-compose openssh-client-def
241+
```
242+
then, try turing VPN off and rebuild the container.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix OOB findings

0 commit comments

Comments
 (0)