Error porting ASN1C source files from PC to STM32 (ARM)

52 Views Asked by At

I am trying to port the code I generated using ASN1C to encode a structure using UPER.

First, I wanted to test the code in my computer so I generated a CodeBlocks project, included those files and verified that the encoding was correct using the console.

Now I have included the same files in my Keil uVision project for an STM32L476 target. After solving some minor issues involving type definitions I am able to compile. But I get the following errors in the linking part:

Build started: Project: WMB-IOT_APP_MOD
Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARM_Compiler_5.06u7\Bin'
Build target '08647APP_MOD_L_V4'
linking...
.\OUT__APP_LM_V4\08647_APP_V200.axf: Error: L6200E: Symbol __stdout multiply defined (by stdio_streams.o and utils_stm32.o).
.\OUT__APP_LM_V4\08647_APP_V200.axf: Error: L6200E: Symbol __stdin multiply defined (by stdio_streams.o and utils_stm32.o).**
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 2 information, 0 warning and 2 error messages.
".\OUT__APP_LM_V4\08647_APP_V200.axf" - 2 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed:  00:00:03

As you can see it seems there is a multiple definition of the input and output streams. The thing is that I cannot find __stdin or __stdout mentioned in any of the files that ASN1C creates. In my understanding there should not be any problem related to it since the code is supposed to be portable. I even deleted the jer and xer encoders, which made use of some stdio functions that I do not need. I feel like I am missing on some advanced embedded C knowledge.

I tried looking at any possible definition of __stdin or __stdout but I cannot find. I defined ASN_EMIT_DEBUG as 0 and disabled support for XER and JER.

0

There are 0 best solutions below