Hi,
Ich versuche grad CrossWorks und die ST Firmware Library zum laufen zu
bewegen.
Scheitere aber schon relativ bald und steh auch komplett auf dem
Schlauch :(
Vielleicht kennt das ja wer: Hier mal meine Einstellungen.
Solution
-->Project
----->Properties
-------->Preprocessor Options -> User Include Directories
$(ProjectDir)/FWLib
In meinem Projektordner gibts "FWLib/*.h,*c" also einfach reinkopiert.
Hier mal der Code...:
1 | /* Includes ------------------------------------------------------------------*/
|
2 | #include "FWLib/stm32f10x_lib.h"
|
3 | //#include <__cross_studio_io.h>
|
4 |
|
5 | /* Private typedef -----------------------------------------------------------*/
|
6 | /* Private define ------------------------------------------------------------*/
|
7 | /* Private macro -------------------------------------------------------------*/
|
8 | /* Private variables ---------------------------------------------------------*/
|
9 | /* Private function prototypes -----------------------------------------------*/
|
10 | /* Private functions ---------------------------------------------------------*/
|
11 | /*******************************************************************************
|
12 | * Function Name : main
|
13 | * Description : Main program.
|
14 | * Input : None
|
15 | * Output : None
|
16 | * Return : None
|
17 | *******************************************************************************/
|
18 | int main(void)
|
19 | {
|
20 | /* Init Functions */
|
21 | RCC_DeInit(); // Init Clock and Reset
|
22 | SysTick_SetReload(9000);
|
23 | SysTick_ITConfig(ENABLE);
|
24 |
|
25 | /* Infinite loop */
|
26 | while (1)
|
27 | {
|
28 | printf("Hallo Welt\n");
|
29 | }
|
30 | }
|
(ob er so funktioniert oder nicht ist egal, ist auch ned fertig, mir
gehts nur ums compelieren)
Beim LINKER kommt
Generating linker script
Linking Lib.elf
c:/rowley associates limited/crossworks for arm 1.7/gcc/bin/ld -X
-nostdlib -ereset_handler --omagic --fatal-warnings -EL -TC:/ST32
Projekte/lib/THUMB Flash Debug/Lib.ld -Map THUMB Flash Debug/Lib.map
--defsym __putchar=debug_putchar -u_vectors -o THUMB Flash Debug/Lib.elf
--start-group THUMB Flash Debug/main.o THUMB Flash Debug/stm32f10x_it.o
THUMB Flash Debug/thumb_crt0.o THUMB Flash Debug/STM32F10x_Startup.o
c:/rowley associates limited/crossworks for arm
1.7/lib/libadiv5_v7m_t_le.a c:/rowley associates limited/crossworks for
arm 1.7/lib/libm_v7m_t_le.a c:/rowley associates limited/crossworks for
arm 1.7/lib/libc_v7m_t_le.a c:/rowley associates limited/crossworks for
arm 1.7/lib/libcpp_v7m_t_le.a c:/rowley associates limited/crossworks
for arm 1.7/lib/libdebugio_v7m_t_le.a c:/rowley associates
limited/crossworks for arm 1.7/lib/libc_targetio_impl_v7m_t_le.a
c:/rowley associates limited/crossworks for arm
1.7/lib/lib_vfprintf_long_v7m_t_le.a c:/rowley associates
limited/crossworks for arm 1.7/lib/lib_vfscanf_long_v7m_t_le.a
THUMB Flash Debug/main.o: In function `main':
C:/ST32 Projekte/lib/main.c:36: undefined reference to `RCC_DeInit'
C:/ST32 Projekte/lib/main.c:37: undefined reference to
`SysTick_SetReload'
C:/ST32 Projekte/lib/main.c:38: undefined reference to
`SysTick_ITConfig'
Build failed
Also kompilieren tut er noch richtig, er scheitert erst beim linken...
Kennt sich damit wer aus?
Lg