Skip to content

Commit

Permalink
Expand unit tests (#130)
Browse files Browse the repository at this point in the history
This is an initial set of tests to cover some of the peripherals. It will be expanded on in the future.

* Add basic CRC test

* add tests for common EXTI

* add iwdg test cases

* Add partial OTP coverage
Expand machines for tests

* Add qtest pulse check function

* - Fix some bugs in G070 exti
- Add test coverage for exti

* Add test case for g070 flash controller

* - Add machines for f4xx
- Add clock flags to RNG
- Add RNG test

* Adapt previous FINT cases for F4xx

* add test case for RCC peripheral resets.

* Add ADC test case for common ADC

* Add ADCC coverage, fix prescale calculation.

* - Fix bugs in ADC align and resolution
- Add test cases for align, DMAR

* - Add tests for DMA unit
- Fix stride/data copies for mismatched sizes
- fix circular mode in both directions

* - Add partial uart test case (baud rate broken)
- Change some macros to functions for better coverage reporting

* - fix F4xx dma implementation issues
- Add test cases for F4xx dma

* add DBG test case

* Fix DMA bugs
  • Loading branch information
vintagepc authored Oct 1, 2023
1 parent 5cc5c0e commit 1398c2a
Show file tree
Hide file tree
Showing 56 changed files with 4,317 additions and 821 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
run: cd ${{ runner.workspace }}/MINI404/build && make coverage-html -j4

- name: Strip down Coverage report
run: cd ${{ runner.workspace }}/MINI404/build/meson-logs && lcov -extract coverage.info '*/arm/prusa/*' --rc lcov_branch_coverage=1 --output-file=c2.info
run: cd ${{ runner.workspace }}/MINI404/build/meson-logs && lcov -extract coverage.info '*/arm/prusa/*' --rc lcov_branch_coverage=1 --output-file=c2.info && lcov -remove c2.info '*/3rdParty/*' --rc lcov_branch_coverage=1 --output-file=c2.info

- name: Upload to codecov.io
uses: codecov/codecov-action@v3
Expand Down
3 changes: 3 additions & 0 deletions hw/arm/prusa/stm32_chips/stm32f407xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
#include "stm32f4xx_irqs.h"
#include "qemu/units.h"

// TODO: clean this up, stm32.h is old/a mess.
#define TYPE_STM32_UART "stm32-uart"

static const stm32_soc_cfg_t stm32f407xx_cfg =
{
.nvic_irqs = F4xx_F407_COUNT_IRQ,
Expand Down
Loading

0 comments on commit 1398c2a

Please sign in to comment.