Hello everyone. I'm using maple mini r2 and i'm trying to run program that uses some standard STM32 libraty (STM32F10x_StdPeriph_Lib_V3.3.0 and STM32F10x_DSP_Lib_V2.0.0) I discovered that i can import library from sketch section (what i did is - i created in libraries a new folder containing needed libs). But when i'm trying to compile, IDE says "... this is the location of the previous definition" and it is pointing almost every function from every library i added. My question is, how to add this libraried without any conflict with IDE libs. Thanks for help
Using STM32F10x library
(3 posts) (2 voices)-
Posted 2 years ago #
-
Ok, i think no body will help me that way. So i have a bit problem because Maple mini is main element in my project. I wanted to ask you for some help in "translating" programs written with ST libs.
Can you guys help me to activate and send data via UART? My goal is to connect bluetooth module to UART2:
Send data:
uint8_t SendDataToBTM222(char *str) { uint32_t i = 0; while(TxLength != 0){}; while((str[i] != 0x00) && (i < 512)) { TxBuffer[i] = str[i]; i++; } if(i < 512) { TxLength = i; while(i < 512){TxBuffer[i++] = 0x00;}; USART_ITConfig(USART2, USART_IT_TXE, ENABLE); return 1; } else { TxLength = 0; return 0; } }
Autor uses here USART_ITConfig which is (Ithink) from ST libs. Where can I find equivalent in IDE libs for this finction ?
And also this part:
void Configuration(void) { USART_InitTypeDef USART_InitStructure; USART_InitStructure.USART_BaudRate = 19200; USART_InitStructure.USART_WordLength = USART_WordLength_8b; USART_InitStructure.USART_StopBits = USART_StopBits_1; USART_InitStructure.USART_Parity = USART_Parity_No; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; USART_Init(USART2, &USART_InitStructure); USART_Cmd(USART2, ENABLE); } int main(void) { Configuration_RCC(); Configuration_GPIO(); Configuration(); Configuration_Interrupts(); }
Can anybody help me ?
Posted 2 years ago # -
krab - But when i'm trying to compile, IDE says "... this is the location of the previous definition" and it is pointing almost every function from every library i added
Folks might be able to offer some hep if you were clearer.
Would you please post some actual example error messages, including the names of the functions? Ideally the code for the smallest test case that fails along with the error messages would be even more helpful?The IDE, like the Arduino, supplies its own
main()
, so that will clash with yours (in your second post). You are going to have to put all of the contents of yourmain()
function into the Maple'ssetup()
function.Posted 2 years ago #
Reply
You must log in to post.