Skip to content

Commit 1398c2a

Browse files
authored
Expand unit tests (#130)
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
1 parent 5cc5c0e commit 1398c2a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+4317
-821
lines changed

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
run: cd ${{ runner.workspace }}/MINI404/build && make coverage-html -j4
7575

7676
- name: Strip down Coverage report
77-
run: cd ${{ runner.workspace }}/MINI404/build/meson-logs && lcov -extract coverage.info '*/arm/prusa/*' --rc lcov_branch_coverage=1 --output-file=c2.info
77+
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
7878

7979
- name: Upload to codecov.io
8080
uses: codecov/codecov-action@v3

hw/arm/prusa/stm32_chips/stm32f407xx.h

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
#include "stm32f4xx_irqs.h"
4040
#include "qemu/units.h"
4141

42+
// TODO: clean this up, stm32.h is old/a mess.
43+
#define TYPE_STM32_UART "stm32-uart"
44+
4245
static const stm32_soc_cfg_t stm32f407xx_cfg =
4346
{
4447
.nvic_irqs = F4xx_F407_COUNT_IRQ,

0 commit comments

Comments
 (0)