Skip to content

Releases: lupyuen/stm32bluepill-mynewt-sensor

Apache Mynewt Sensor App for STM32 Blue Pill with Quectel NB-IoT BC95-G (Windows Build)

25 Jul 09:35
Compare
Choose a tag to compare

Prerelease: Apache Mynewt Sensor App for STM32 Blue Pill with Quectel NB-IoT BC95-G (Windows Build)

24 Jul 05:35
Compare
Choose a tag to compare
  1. Download the .7z file attached below

  2. Expand the .7z file with 7zip:

    https://www.7-zip.org/download.html

  3. Install Arm Cross-Compiler and Linker for Windows from Arm Developer Website:

    https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2019q3/RC1.1/gcc-arm-none-eabi-8-2019-q3-update-win32-sha1.exe?revision=fcadabed-d946-49dc-8f78-0732d2f43773?product=GNU%20Arm%20Embedded%20Toolchain,32-bit,,Windows,8-2019-q3-update

  4. Download the ST-Link USB driver from ST-Link Driver Website (email registration required):

    https://www.st.com/en/development-tools/stsw-link009.html

  5. Click Get Software

    Unzip the downloaded file. Double-click the driver installer:

    dpinst_amd64.exe

  6. Install Windows Studio Code:

    https://code.visualstudio.com/

  7. Launch Visual Studio Code

  8. Install the extension "Cortex-Debug":

    https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug

  9. Click File → Open Folder. Select the downloaded folder stm32bluepill-mynewt-sensor. When prompted to open the workspace, click Open Workspace

  10. Click Terminal → Run Task → [1] Build bluepill_boot

  11. Click Terminal → Run Task → [2] Build bluepill_my_sensor

  12. Click Terminal → Run Task → [3] Image bluepill_my_sensor

  13. Click Terminal → Run Task → [4] Load bluepill_boot

  14. Click Terminal → Run Task → [5] Load bluepill_my_sensor

newt\newt.exe was built for Windows from

https://github.com/lupyuen/mynewt-newt

mynewt-jetson: microSD Card image for Nvidia Jetson Nano

18 Jul 10:28
e542eb7
Compare
Choose a tag to compare

Complete source code and tools for building Mynewt for STM32 Blue Pill, packaged as a bootable microSD card for Nvidia Jetson Nano. The code is described in the third article of the series...

Build Your IoT Sensor Network — STM32 Blue Pill + nRF24L01 + ESP8266 + Apache Mynewt + thethings.io

  • Download the 6-part (5.5 GB) 7zip archive: *7z.001, *7z.002, ...

  • Run 7zip or Keka to expand the archive into a 30 GB microSD image file mynewt-jetson.img

  • Launch SD Memory Card Formatter for Windows or Etcher (for macOS) to write the image file mynewt-jetson.img into a 32 GB UHS-1 microSD card (or larger)

  • Insert the microSD card into Jetson Nano and power on. Wait for the desktop to appear.

  • Source code is located in /opt/mynewt, based on Mynewt 1.6.0

  • Run code-oss (or click the icon at top left with the horizontal lines) to launch Visual Studio Code. Open the folder /opt/mynewt

  • To build, look for the Task Runner at the lower left corner. Click Clean, then Build bluepill_boot, then Build bluepill_my_sensor

  • Visual Studio Remote SSH is NOT supported on Arm64

  • Excludes Rust support

  • SSH is enabled for hostname jetson.local...

    User: user

    Password: password

    For example: ssh user@jetson.local

  • Operating system is Ubuntu 19.04, instead of the default 18.04 bundled with Jetson Nano

  • The installed image only uses 32 GB of the microSD card. Run a partitioning tool like gparted to expand the partition to fill up the entire microSD card

  • Script used to generate this image:

Disable screensaver, screen timeout

# Install open-source build of Visual Studio Code
wget -qO - https://packagecloud.io/headmelted/codebuilds/gpgkey | sudo apt-key add -
sudo -s
. <( wget -O - https://code.headmelted.com/installers/apt.sh )
exit
sudo apt autoremove -y

# Install Mynewt
sudo mkdir /opt/mynewt
sudo chown user:user /opt/mynewt
git clone https://github.com/lupyuen/stm32bluepill-mynewt-sensor /opt/mynewt
cd /opt/mynewt
chmod +x scripts/*.sh
./scripts/install-arm.sh

Apply fixes from
https://gist.github.com/lupyuen/bbc2dae52a8fdac1e70a60757fed1467

newt build -v bluepill_boot
newt build -v bluepill_my_sensor
newt size -v bluepill_my_sensor

# Install Task Runner Extension for VSCode

# Allow upgrade Ubuntu to 19.04
sudo nano /etc/update-manager/release-upgrades
Change to "Prompt=normal"

# Upgrade to Ubuntu 18.10
sudo do-release-upgrade

When prompted to overwrite changed config files, enter Y

# Upgrade again to Ubuntu 19.04
sudo do-release-upgrade

Enable auto login

# Fix font antialiasing for 4K displays
Launch Gnome Tweak Tool
Set "Fonts -> Antialiasing" to "Greyscale"

Install gparted

# Download the Official NVIDIA Jetson driver package
sudo apt install binfmt-support qemu qemu-user-static debootstrap -y
cd /tmp
wget https://developer.nvidia.com/embedded/dlc/l4t-jetson-driver-package-32-1-jetson-nano
mv l4t-jetson-driver-package-32-1-jetson-nano l4t-jetson-driver-package-32-1-jetson-nano.tar.bz 
tar -xvf l4t-jetson-driver-package-32-1-jetson-nano.tar.bz

sudo mv Linux_for_Tegra /opt
sudo chown user:user /opt/Linux_for_Tegra
mkdir /opt/Linux_for_Tegra/rootfs/etc/
cp /etc/nv_tegra_release /opt/Linux_for_Tegra/rootfs/etc/

# Prepare to create image for SD card. Remove files from last session
sudo rm /opt/Linux_for_Tegra/bootloader/system.img
sudo rm /opt/Linux_for_Tegra/bootloader/system.img.raw
sudo rm -r /opt/Linux_for_Tegra/rootfs/*

# Create image for SD card (based on https://gglabs.us/node/2060).
# Need to exclude the "sys" subfolders individually because "/opt/mynewt/repos" also contains a sys folder.
# Excluding absolute paths "/sys/.." does not work.
cd /
sudo rm /tmp/root.tar
sudo tar \
    --exclude='proc/*' \
    --exclude='sys/block' \
    --exclude='sys/bus' \
    --exclude='sys/class' \
    --exclude='sys/dev' \
    --exclude='sys/devices' \
    --exclude='sys/firmware' \
    --exclude='sys/fs' \
    --exclude='sys/kernel' \
    --exclude='sys/module' \
    --exclude='sys/power' \
    --exclude='dev/pts/*' \
    --exclude='tmp/*' \
    -cpf /tmp/root.tar \
    bin boot dev etc home lib media mnt opt proc root run sbin srv sys tmp usr var

# Expand into staging area.
cd /opt/Linux_for_Tegra/rootfs
sudo tar -xpf /tmp/root.tar 

# Create image from staging area.
cd /opt/Linux_for_Tegra
sudo rm /tmp/mynewt-jetson.img
sudo ./create-jetson-nano-sd-card-image.sh -o /tmp/mynewt-jetson.img -s 28G -r 200 >create.log 2>&1

[DRAFT Ubuntu 18.04] mynewt-jetson: microSD Card image for Nvidia Jetson Nano

17 Jul 22:53
e542eb7
Compare
Choose a tag to compare

Complete source code and tools for building Mynewt for STM32 Blue Pill, packaged as a bootable microSD card for Nvidia Jetson Nano. The code is described in the third article of the series...

Build Your IoT Sensor Network — STM32 Blue Pill + nRF24L01 + ESP8266 + Apache Mynewt + thethings.io

  • Download the 6-part (5.2 GB) 7zip archive: *7z.001, *7z.002, ...

  • Run 7zip or Keka to expand the archive into a 16 GB microSD image file mynewt-jetson.img

  • Launch SD Memory Card Formatter for Windows or Etcher (for macOS) to write the image file mynewt-jetson.img into a 16 GB UHS-1 microSD card (or larger)

  • Insert the microSD card into Jetson Nano and power on. Wait for the desktop to appear.

  • SSH is enabled for hostname jetson.local...

    User: user

    Password: password

    For example: ssh user@jetson.local

  • Source code is located in /opt/mynewt, based on Mynewt 1.6.0

  • Includes open-source version of Visual Studio Code for Arm64. Enter code-oss to launch Visual Studio Code, open the folder /opt/mynewt

  • Visual Studio Remote SSH is NOT supported on Arm64

  • Excludes Rust support

  • Operating system is Ubuntu 18.04. To upgrade to Ubuntu 19.04:

# Allow upgrade Ubuntu to 19.04
sudo nano /etc/update-manager/release-upgrades
Change to "Prompt=normal"

# Upgrade to Ubuntu 18.xx
sudo do-release-upgrade

When prompted to overwrite changed config files, enter Y

# Upgrade again to Ubuntu 19.04
sudo do-release-upgrade
  • Script used to generate this image:
Disable screensaver, screen timeout

# Install open-source build of Visual Studio Code
wget -qO - https://packagecloud.io/headmelted/codebuilds/gpgkey | sudo apt-key add -
sudo -s
. <( wget -O - https://code.headmelted.com/installers/apt.sh )
exit
sudo apt autoremove -y

# Install Mynewt
sudo mkdir /opt/mynewt
sudo chown user:user /opt/mynewt
git clone https://github.com/lupyuen/stm32bluepill-mynewt-sensor /opt/mynewt
cd /opt/mynewt
chmod +x scripts/*.sh
./scripts/install-arm.sh

Apply fixes from
https://gist.github.com/lupyuen/bbc2dae52a8fdac1e70a60757fed1467

newt build -v bluepill_boot
newt build -v bluepill_my_sensor
newt size -v bluepill_my_sensor

# Install Task Runner Extension for VSCode

# Download the Official NVIDIA Jetson driver package
sudo apt install binfmt-support qemu qemu-user-static debootstrap -y
cd /tmp
wget https://developer.nvidia.com/embedded/dlc/l4t-jetson-driver-package-32-1-jetson-nano
mv l4t-jetson-driver-package-32-1-jetson-nano l4t-jetson-driver-package-32-1-jetson-nano.tar.bz 
tar -xvf l4t-jetson-driver-package-32-1-jetson-nano.tar.bz

sudo mv Linux_for_Tegra /opt
sudo chown user:user /opt/Linux_for_Tegra
mkdir /opt/Linux_for_Tegra/rootfs/etc/
cp /etc/nv_tegra_release /opt/Linux_for_Tegra/rootfs/etc/

# Remove files from last session
sudo rm /opt/Linux_for_Tegra/bootloader/system.img
sudo rm /opt/Linux_for_Tegra/bootloader/system.img.raw
sudo rm -r /opt/Linux_for_Tegra/rootfs/*

# Create image for SD card (based on https://gglabs.us/node/2060)
cd /
sudo rm /tmp/root.tar
sudo tar \
    --exclude='proc/*' --exclude='sys/*' --exclude='dev/pts/*' --exclude='tmp/*' \
    -cpf /tmp/root.tar \
    bin boot dev etc home lib media mnt opt proc root run sbin srv sys tmp usr var

cd /opt/Linux_for_Tegra/rootfs
sudo tar -xpf /tmp/root.tar 

cd /opt/Linux_for_Tegra
sudo rm /tmp/mynewt-jetson.img
sudo ./create-jetson-nano-sd-card-image.sh -o /tmp/mynewt-jetson.img -s 15G -r 200 >create.log 2>&1

Ubuntu VirtualBox with Source Code and Build Tools

16 Jul 03:29
c031ec7
Compare
Choose a tag to compare

Complete source code and tools for building Mynewt for STM32 Blue Pill, packaged as Ubuntu 19.04 (64-bit) VirtualBox. The code is described in the third article of the series...

Build Your IoT Sensor Network — STM32 Blue Pill + nRF24L01 + ESP8266 + Apache Mynewt + thethings.io

  • Download the 4-part (3.4 GB) 7zip archive: *7z.001, *7z.002, ...

  • Run 7zip or Keka to expand the archive into an 8.57 GB VirtualBox

  • SSH is enabled for hostname ubuntu1904.local...

    User: user

    Password: password

    For example: ssh user@ubuntu1904.local

  • Source code is located in /opt/mynewt, based on Mynewt 1.6.0

  • Includes Visual Studio Code for Ubuntu. Enter code to launch Visual Studio Code, open the folder /opt/mynewt

  • You may also use Visual Studio Code for Windows or Mac and connect to the VirtualBox with the Remote SSH Extension:

    1. On Windows or Mac, launch Visual Studio Code and install the Remote SSH Extension

    2. Click View → Command Palette → Remote SSH: Connect To Host

    3. Enter user@ubuntu1904.local. Password is password

    4. Select the folder /opt/mynewt

    Remote build works OK, but remote debugging not yet tested. Watch the video: https://youtu.be/CI2VSZkZYaI

  • Excludes Rust support

  • Script used to generate this image:

sudo mkdir /opt/mynewt
sudo chown user:user /opt/mynewt
git clone https://github.com/lupyuen/stm32bluepill-mynewt-sensor /opt/mynewt
cd /opt/mynewt
./scripts/install-linux

Apply fixes from
https://gist.github.com/lupyuen/bbc2dae52a8fdac1e70a60757fed1467

newt build -v bluepill_boot
newt build -v bluepill_my_sensor
newt size -v bluepill_my_sensor