1761ea38d9 | ||
---|---|---|
.template_files | ||
inc | ||
mocks | ||
nbproject | ||
src | ||
tests | ||
.gitignore | ||
CMakeLists.txt | ||
Doxyfile | ||
Makefile | ||
README.md | ||
avr-gcc-toolchain.cmake | ||
defmplabxtrace.log | ||
defmplabxtrace.log.inx | ||
otto.sh | ||
setup.sh |
README.md
FG004_A(High Power)
Description
This embedded firmware is the High Power mode for the software.
Micro Controller Pins
ATtiny404
- VDD(+5v)
- PA4(ADC_LOAD1)
- PA5(ADC_LOAD2)
- PA6(ADC_LOAD3)
- PA7(zerocrossing)
- PB3(EN2)
- PB2(EN3)
- PB1(SDA)
- PB0(SCL)
- RST(NC)
- PA1(G1)
- PA2(EN1)
- PA3(NC)
- VSS(GND)
key NC:: Not Connected PBX:: Port B pin X PAX:: Port A pin X RST:: Reset pin
Project Layout
Tree -L 1, output
.
├── avr-gcc-toolchain.cmake
├── build
├── CMakeLists.txt
├── compile_commands.json -> ./build/compile_commands.json
├── docs
├── Doxyfile
├── inc
├── mocks
├── otto.sh
├── README.md
├── setup.sh
├── src
└── tests
6 directories, 7 files
The source code required to run/build the project is in the /src
directory,
with the headers residing inside the /inc
directory for most public modules.
All other directories are for supporting the development cycle and are used for
testitng the code base to ensure accuracy and quality. These are contained in
the tests
and mocks
directories.
Documentation that has been generated is inside the docs folder which contains the html output that can be browswed via your regular web browser.
PDF genreation from the doumentaiton is also possible if enabled through the
Doxyfile
inside the projects root directory.
The build directory contains the output and makefiles genrerated automatically when using CMake.
This build directory also holds the bin files genreated along with the hex and elf files.
Build Requirements
- AVR-GCC toolchain OR XC8 from microchip.
- Make OR CMAKE
- avrdude
- A AVR programmer, usbasp for older chips and UPDI for newer ones.
Dev Requirements
- ATtiny404 series micro-controller
- AVR-GCC toolchain.
- Cmake
- cpputest(Unit testing harness.)
- Doxygen(For documentation)
- Git(For version control)
Running Unit Tests
To run the cppunit tests you can use the included shell script inside a bash shell.
echo "1" | ./otto.sh
The command runs the otto script which automates parts of the development cycle such as running and building tests, compiling hex files and flashing the code to a micro-controller using arvdude.
Roadmap
Some stuff that still needs done.
- Add ADC Mocked interface.
- Write tests for ADC Mock
- Write ZCD using ADC Mock.
- Write ADC version for ATtiny404