Let's say I compile the following code and compile it to a library for the STM32F4
int GetValue(unsigned char* pBuffer,int nSize) { int nIndex = 0; for(nIndex = 0;nIndex <nSize;nIndex++) { pBuffer[nIndex] = nIndex; } return nIndex; }
The result is ExampleLib.lib
I then include it in the project file:
<DriverLibs Include="Solutions\NetduinoPlus2\DeviceCode\Example\Example\Stubs\ExampleLib.$(LIB_EXT)"/>
During compile the binary is linked and the firmware builds without any issues, I can deploy it to the Netduino
but as soon as we do it crashes.
Am I missing something here?
Note: I know I could just include the source code instead, but I want to understand what it takes to include a binary directly