Difference between revisions of "Novena/Power Management Board"

From Studio Kousagi Wiki
Jump to: navigation, search
(Created page with "The Novena Power Management Board (PMB) contains an STM32 ARM processor (STM32F101x8) with 64 KiB of flash and 10 KiB of RAM. ==Hardware components== * STM32 ARM Cortex M3 proc...")
 
(Software Development)
Line 21: Line 21:
 
To prepare your system for building, install the following packages:
 
To prepare your system for building, install the following packages:
  
    sudo apt-get install openocd screen build-essential git
+
sudo apt-get install openocd screen build-essential git
  
 
Then, check out the [https://github.com/xobs/novena-pmb-chibios source code]:
 
Then, check out the [https://github.com/xobs/novena-pmb-chibios source code]:
  
    git clone https://github.com/xobs/novena-pmb-chibios.git
+
git clone https://github.com/xobs/novena-pmb-chibios.git
  
 
The actual PMB source project is located in projects/novena-pmb:
 
The actual PMB source project is located in projects/novena-pmb:
  
    cd novena-pmb-chibios/projects/novena-pmb
+
cd novena-pmb-chibios/projects/novena-pmb
  
 
Build everything (using all four cores):
 
Build everything (using all four cores):
  
    make -j4
+
make -j4
  
 
Connect your JTAG box.  Set the environment variable JTAG to match your JTAG box.  If using a J-Link box, set it to "jlink".  For RLink, set it to "rlink".  Then, reprogram the PMB:
 
Connect your JTAG box.  Set the environment variable JTAG to match your JTAG box.  If using a J-Link box, set it to "jlink".  For RLink, set it to "rlink".  Then, reprogram the PMB:
  
    ./reprogram.sh
+
./reprogram.sh
  
 
After reprogramming, the script will reset the PMB and halt.  You can then interact with the running processor, or connect to the debugger over the network.  GDB is running on port 3333, and an interactive debugger shell is running on port 4444.
 
After reprogramming, the script will reset the PMB and halt.  You can then interact with the running processor, or connect to the debugger over the network.  GDB is running on port 3333, and an interactive debugger shell is running on port 4444.

Revision as of 05:15, 25 September 2013

The Novena Power Management Board (PMB) contains an STM32 ARM processor (STM32F101x8) with 64 KiB of flash and 10 KiB of RAM.

Hardware components

  • STM32 ARM Cortex M3 processor (STM32F101x8) with 64 KiB of FLASH and 10 KiB of RAM
  • TI BQ20Z95 SBS-complient fuel gauge on I2C address 0xb
  • TI BQ24765 SBS-complient battery charger on I2C address 0x9
  • TI DAC081C081 voltage monitor on I2C address 0xd
  • Molex connector for battery input
  • Molex connector for battery cell balancing
  • 20-pin JTAG connector
  • Serial lines, connected to mainboard's UART4 (seen as /dev/ttymxc3)
  • Battery-backed or supercap-backed storage

Software Development

Since Novena tends to have a compiler, and both Novena and the PMB use ARM CPUs, we simply use the native Novena compiler to build the image for the PMB.

The operating system of choice is ChibiOS/RT. It is small, multi-threaded, and has peripheral support for many features of the chosen STM32.

To prepare your system for building, install the following packages:

sudo apt-get install openocd screen build-essential git

Then, check out the source code:

git clone https://github.com/xobs/novena-pmb-chibios.git

The actual PMB source project is located in projects/novena-pmb:

cd novena-pmb-chibios/projects/novena-pmb

Build everything (using all four cores):

make -j4

Connect your JTAG box. Set the environment variable JTAG to match your JTAG box. If using a J-Link box, set it to "jlink". For RLink, set it to "rlink". Then, reprogram the PMB:

./reprogram.sh

After reprogramming, the script will reset the PMB and halt. You can then interact with the running processor, or connect to the debugger over the network. GDB is running on port 3333, and an interactive debugger shell is running on port 4444.