Hello Everyone,
I have an error message that seems easy to fix, but I have used all of my brain cells trying to figure this out after a couple of days.
I have the Keil IDE with the ARM® Compiler toolchain Version 5.02
The processor is a stm32f303
This is my error message.
UART STM32F3.axf: Error: L6218E: Undefined symbol ucInputBuffer (referred from routine.o).
The "ucInputBuffer" is my own variable.
I have the #include "routine.h" where the "ucInputBuffer" is declared.
Inside the "routine.h" file I declare the variable like shown below.
extern volatile unsigned char ucInputBuffer;
This is my compiler control string.
-c --cpu Cortex-M4.fp -g -O0 --apcs=interwork -I..\STM32F3 -I C:\Keil\ARM\RV31\INC -I C:\Keil\ARM\CMSIS\Include -I C:\Keil\ARM\Inc\ST\STM32F30x -o "*.o" --omf_browse "*.crf" --depend "*.d"
This is the linker control string.
--cpu Cortex-M4.fp *.o --strict --scatter "UART STM32F3.sct" --summary_stderr --info summarysizes --map --xref --callgraph --symbols --info sizes --info totals --info unused --info veneers --list ".\UART STM32F3.map" -o "UART STM32F3.axf"
Any ideas anyone???
Thankyou
Both posts 21:14.
So now we know that Keil don't use a thread-safe method to allocate the ID for the next post in the database. All it needs are two "post" that happens near enough that they get concurrently processed by the web server.
Atomic operations are among the first things to consider when implementing web services. There are a number of tricks available to get even stupid databases to supply unique new record ID:s to concurrently running threads without collisions when two posts needs to be created and post A points to post B and post B points to post A. Or in this case the "thread" record points to the first post record, while the post record points to the owning thread record.
Web scripts can't be written as if they own the database, since almost all web servers supports concurrent servicing of web pages.