Main Site Documentation

Build fails


#1

I followed all the instructions to install TinyCLR source to build the targets. It fails with the following output

collect2.exe: error: ld returned 1 exit status
C:\Program Files (x86)\GNU Tools ARM Embedded\7 2017-q4-major\bin\arm-none-eabi-objcopy.exe: 'C:\Tools\tinyCLR\TinyCLR-Ports\Build\release\FEZCLR\FEZCLR Firmware.axf': No such file
C:\Program Files (x86)\GNU Tools ARM Embedded\7 2017-q4-major\bin\arm-none-eabi-objcopy.exe: 'C:\Tools\tinyCLR\TinyCLR-Ports\Build\release\FEZCLR\FEZCLR Firmware.axf': No such file
Cannot read input file.

There is no axf file in the directory shown.


#2

When I check back on the build output I am getting a number of errors. This is one of them

C:\Tools\tinyCLR\TinyCLR-Ports\Targets\STM32F4xx\STM32F4_ADC.cpp:53:27: error: invalid conversion from 'TinyCLR_Result (*)(const TinyCLR_Adc_Provider*, int32_t) {aka TinyCLR_Result (*)(const TinyCLR_Adc_Provider*, long int)}' to 'TinyCLR_Result (*)(const TinyCLR_Adc_Provider*)' [-fpermissive]
     adcProvider.Acquire = &STM32F4_Adc_Acquire;

The code was not changed and comsply cloned from github.


#3

My guess is that it’s because you’re trying to build the source on the dev branch which has progressed since 0.11.0 was released while TinyCLR.h and the pre-compiled libraries are only for 0.11.0.

I’ve clarified the build steps docs to highlight this.


#4

Is there a link to the build steps as I can’t see any changes from today.


#5

They haven’t made it to the live site yet, you can find the source at https://github.com/ghi-electronics/Docs/blob/dev/software/tinyclr/porting/intro.md


#6

Dave be careful to use specific release because libs are not in source code on github.

https://github.com/ghi-electronics/TinyCLR-Ports/releases


#7

Cheers John, it now builds without errors.


#8

Hey everyone, I’m still having trouble building. I cloned the master branch, and followed the rest of the instructions, pasting the v0.11 files into the Core directory. Here’s a sample of the build errors:

In file included from D:\git\CLR\Targets\STM32F4xx\STM32F4_ADC.cpp:17:0:
D:\git\CLR\Targets\STM32F4xx\STM32F4.h:213:45: error: 'TinyCLR_SdCard_Provider'
does not name a type; did you mean 'TinyCLR_Uart_Provider'?
 TinyCLR_Result STM32F4_SdCard_Acquire(const TinyCLR_SdCard_Provider* self, int3
2_t controller);
                                             ^~~~~~~~~~~~~~~~~~~~~~~
                                             TinyCLR_Uart_Provider
D:\git\CLR\Targets\STM32F4xx\STM32F4.h:214:45: error: 'TinyCLR_SdCard_Provider'
does not name a type; did you mean 'TinyCLR_Uart_Provider'?
 TinyCLR_Result STM32F4_SdCard_Release(const TinyCLR_SdCard_Provider* self, int3
2_t controller);

#9

So, my first post is a fail. It turns out somehow I did move the dropdown to dev when I cloned. Recloned to master and now it is working correctly. Thanks!