Skip to content

Latest commit

 

History

History
113 lines (86 loc) · 3.62 KB

building.md

File metadata and controls

113 lines (86 loc) · 3.62 KB

Building from Source

atmega32 - linux

dependencies: git, cmake, avrdude, avr-libc, gcc-avr

user@~$ sudo apt-get install cmake avrdude avr-libc gcc-avr git
user@~$ git clone https://github.com/stawel/cheali-charger.git
user@~$ cd cheali-charger
user@~$ git submodule init
user@~$ git submodule update
user@~/cheali-charger$ ./bootstrap
user@~/cheali-charger$ make
      
flashing [your charger] with USBasp:
    
user@~/cheali-charger$ cd src/hardware/atmega32/targets/[your charger]
user@~/cheali-charger/src/hardware/atmega32/targets/[your charger]$ ./progUSBasp.sh

Now You should see a "cheali-charger welcome" screen.

nuvoton M0517 - linux

dependencies: git, cmake, gcc-arm-none-eabi, openocd (patched)

install gcc-arm-none-eabi
compile and install openocd (patched)
copy openocd/contrib/99-openocd.rules to /etc/udev/rules.d

user@~$ sudo apt-get install git cmake
user@~$ git clone https://github.com/stawel/cheali-charger.git
user@~$ cd cheali-charger
user@~$ git submodule init
user@~$ git submodule update
user@~/cheali-charger$ ./bootstrap-arm
user@~/cheali-charger$ make

flashing [your charger] with st-link-V2 or stm32f4discovery:
(patched openocd needed)
  
user@~/cheali-charger$ cd src/hardware/nuvoton-M0517/targets/[your charger]
user@~/cheali-charger/src/hardware/nuvoton-M0517/targets/[your charger]$ ./progStLink.sh

Now You should see a "cheali-charger welcome" screen.

atmega32 - windows

Atmel Studio

  • install Atmel Studio and cmake
  • start a "Atmel Studio Command Prompt" and go to your cheali-charger directory.
  • run:
  s:\cheali-charger> cmake . -G "Unix Makefiles"
  s:\cheali-charger> make
  • hex file should be in s:\cheali-charger\src\atmega32\targets\[your charger]\cheali-charger*.hex

cygwin

  • install cygwin
  • in cygwin install: cmake avrdude avr-libc gcc-avr git make
  • in cygwin run:
  ~/cheali-charger$ ./bootstrap
  ~/cheali-charger$ make
  • hex file should be in ~/cheali-charger/src/atmega32/targets/[your charger]/cheali-charger*.hex

nuvoton M0517 - windows

  • install CooCox CoIDE
  • install GNU Tools for ARM Embedded Processors
  • open CoIDE, go to Project -> Open Project and select cheali-charger\CoIDE\cheali-charger.coproj
  • go to Project -> Select Toolchain Path and select bin folder of [GNU Tools for ARM Embedded Processors](ex. C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2015q1\bin)
  • go to Project -> Build
  • hex file should be in cheali-charger\CoIDE\cheali-charger\Debug\bin

atmega32 - OSX

dependencies: git, cmake, avrdude, avr-libc, gcc-avr

install macports

user@~$ sudo port install cmake avrdude avr-libc gcc-avr git
user@~$ git clone https://github.com/stawel/cheali-charger.git
user@~$ cd cheali-charger
user@~$ git submodule init
user@~$ git submodule update
user@~/cheali-charger$ ./bootstrap
user@~/cheali-charger$ make
      
flashing [your charger] with USBasp:
      
user@~/cheali-charger$ cd src/hardware/atmega32/targets/[your charger]
user@~/cheali-charger/src/hardware/atmega32/targets/[your charger]$ ./progUSBasp.sh

Now You should see a "cheali-charger welcome" screen.

nuvoton M0517 - OSX

(TODO)