3 Commits

Author SHA1 Message Date
4ceabca1b4 photo 2024-05-08 10:50:50 +02:00
a33dbe2387 Merge branch 'fix_power_export_issue' 2023-03-18 18:03:56 +01:00
78509ff2cb test scripts 2023-03-18 18:03:05 +01:00
6 changed files with 31 additions and 3 deletions

BIN
docs/IMG_2915.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -1,3 +1,6 @@
![](./docs/IMG_2915.jpg)
## Build environment
On Ubuntu/Debian install

View File

@ -1,12 +1,12 @@
CFLAGS=-I../cube/User/Inc -DTEST
CFLAGS=-I../../cube/User/Inc -DTEST
test: ringbuffer.o test.o
gcc -o $@ -lcunit $^
ringbuffer.o: ../cube/User/Src/ringbuffer.c
ringbuffer.o: ../../cube/User/Src/ringbuffer.c
gcc -c -o $@ $(CFLAGS) $^
logger.o: ../cube/User/Src/logger.c
logger.o: ../../cube/User/Src/logger.c
gcc -c -o $@ $(CFLAGS) $^
test.o: test.c

15
tests/test2/Makefile Normal file
View File

@ -0,0 +1,15 @@
test: test.o
gcc -o $@ $^
test.o: test.c
gcc -c -o $@ $(CFLAGS) $^
.PHONY: run
run: test
./test
.PHONY: clean
clean:
rm -f *.o test

10
tests/test2/test.c Normal file
View File

@ -0,0 +1,10 @@
#include <stdio.h>
#include <stdint.h>
int main() {
uint32_t i = -10;
int32_t j = i;
printf("%lu %d\n", i, j);
}