Can't understand way to build AM32_SKYSTARS_KM55_E230
wireless-road opened this issue · 1 comments
Hello!
Thank you very much for awesome project!
Probably i am newbie so can't understand proper way to build AM32_SKYSTARS_KM55_E230
mentioned here.
I see that firmware in latest release list.
But when i try to build it from source code (by entering make
command) it doesn't build somewhy.
Tried to modify makefiles to include GD32
targets to be built but it gives me following errors:
Compiling AM32_GD32TEST_2.00.elf
In file included from Src/main.c:191:
Inc/common.h:12:17: error: conflicting types for 'armed_count_threshold'
12 | extern uint16_t armed_count_threshold;
| ^~~~~~~~~~~~~~~~~~~~~
In file included from Src/main.c:187:
Mcu/f350/Inc/IO.h:29:12: note: previous declaration of 'armed_count_threshold' was here
29 | extern int armed_count_threshold;
| ^~~~~~~~~~~~~~~~~~~~~
In file included from Src/main.c:191:
Inc/common.h:17:17: error: conflicting types for 'input'
17 | extern uint16_t input;
| ^~~~~
In file included from Src/main.c:187:
Mcu/f350/Inc/IO.h:23:12: note: previous declaration of 'input' was here
23 | extern int input;
| ^~~~~
In file included from Src/main.c:191:
Inc/common.h:18:17: error: conflicting types for 'newinput'
18 | extern uint16_t newinput;
| ^~~~~~~~
In file included from Src/main.c:187:
Mcu/f350/Inc/IO.h:24:12: note: previous declaration of 'newinput' was here
24 | extern int newinput;
| ^~~~~~~~
Src/main.c:283:42: error: 'TARGET_STALL_PROTECTION_INTERVAL' undeclared here (not in a function)
283 | uint16_t stall_protect_target_interval = TARGET_STALL_PROTECTION_INTERVAL;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Src/main.c:311:66: error: 'FILE_NAME' undeclared here (not in a function)
311 | const char filename[30] __attribute__((section(".file_name"))) = FILE_NAME;
| ^~~~~~~~~
Src/main.c:504:10: error: conflicting types for 'armed_count_threshold'
504 | uint16_t armed_count_threshold = 1000;
| ^~~~~~~~~~~~~~~~~~~~~
In file included from Src/main.c:187:
Mcu/f350/Inc/IO.h:29:12: note: previous declaration of 'armed_count_threshold' was here
29 | extern int armed_count_threshold;
| ^~~~~~~~~~~~~~~~~~~~~
Src/main.c:509:10: error: conflicting types for 'input'
509 | uint16_t input = 0;
| ^~~~~
In file included from Src/main.c:187:
Mcu/f350/Inc/IO.h:23:12: note: previous declaration of 'input' was here
23 | extern int input;
| ^~~~~
Src/main.c:510:10: error: conflicting types for 'newinput'
510 | uint16_t newinput =0;
| ^~~~~~~~
In file included from Src/main.c:187:
Mcu/f350/Inc/IO.h:24:12: note: previous declaration of 'newinput' was here
24 | extern int newinput;
| ^~~~~~~~
Src/main.c:519:30: error: 'TARGET_MIN_BEMF_COUNTS' undeclared here (not in a function)
519 | uint8_t min_bemf_counts_up = TARGET_MIN_BEMF_COUNTS;
| ^~~~~~~~~~~~~~~~~~~~~~
Src/main.c: In function 'tenKhzRoutine':
Src/main.c:1224:29: error: 'RAMP_SPEED_LOW_RPM' undeclared (first use in this function)
1224 | max_duty_cycle_change = RAMP_SPEED_LOW_RPM;
| ^~~~~~~~~~~~~~~~~~
Src/main.c:1224:29: note: each undeclared identifier is reported only once for each function it appears in
Src/main.c: In function 'main':
Src/main.c:1700:65: error: 'CURRENT_OFFSET' undeclared (first use in this function)
1700 | actual_current = ((smoothed_raw_current * 3300/41) - (CURRENT_OFFSET*100))/ (MILLIVOLT_PER_AMP);
| ^~~~~~~~~~~~~~
Src/main.c:1700:88: error: 'MILLIVOLT_PER_AMP' undeclared (first use in this function)
1700 | actual_current = ((smoothed_raw_current * 3300/41) - (CURRENT_OFFSET*100))/ (MILLIVOLT_PER_AMP);
| ^~~~~~~~~~~~~~~~~
In file included from Src/signal.c:15:
Inc/common.h:12:17: error: conflicting types for 'armed_count_threshold'
12 | extern uint16_t armed_count_threshold;
| ^~~~~~~~~~~~~~~~~~~~~
In file included from Src/signal.c:10:
Mcu/f350/Inc/IO.h:29:12: note: previous declaration of 'armed_count_threshold' was here
29 | extern int armed_count_threshold;
| ^~~~~~~~~~~~~~~~~~~~~
In file included from Src/signal.c:15:
Inc/common.h:17:17: error: conflicting types for 'input'
17 | extern uint16_t input;
| ^~~~~
In file included from Src/signal.c:10:
Mcu/f350/Inc/IO.h:23:12: note: previous declaration of 'input' was here
23 | extern int input;
| ^~~~~
In file included from Src/signal.c:15:
Inc/common.h:18:17: error: conflicting types for 'newinput'
18 | extern uint16_t newinput;
| ^~~~~~~~
In file included from Src/signal.c:10:
Mcu/f350/Inc/IO.h:24:12: note: previous declaration of 'newinput' was here
24 | extern int newinput;
| ^~~~~~~~
make[1]: *** [makefile:93: obj/AM32_GD32TEST_2.00.elf] Error 1
make: *** [makefile:84: GD32TEST] Error 2
Found following commit: remove gd32 from build, add new g071 targets
Switched to commit before of this and got make
build failed with following errors:
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/ccA4fYCF.o: in function `tenKhzRoutine':
main.c:(.text.tenKhzRoutine+0x57c): undefined reference to `proportionalBrake'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /tmp/ccA4fYCF.o: in function `main':
main.c:(.text.startup.main+0x8d8): undefined reference to `proportionalBrake'
collect2: error: ld returned 1 exit status
So could someone please help to build AM32_SKYSTARS_KM55_E230
from sources? Probably i missed something but don't understand what.
Sources for all mcus are here. We have moved to Kiel for building the projects. https://github.com/am32-firmware/AM32/tree/main