Hi Ben
Strange Problem.
I insert some C-Code. sometimes it's working, somtimes not. I don't now what is wrong in the few commands.
Is there something I'm doing wrong?
/*
Enter C code below this comment
*/
FCD_0e742_PWDN_ADS__TurnOn();
// Call Component Macro: RESET_ADS::TurnOn()
FCD_0e743_RESET_ADS__TurnOn();
// Delay: 500 ms
FCI_DELAYINT_MS(500);
// Call Component Macro: CS_ADS::TurnOff()
FCD_0e743_RESET_ADS__TurnOff();
// Call Component Macro: SPI_ADS99::SendChar(.wakeup)
FCD_06c41_SPI_ADS99__SendChar(FCL_WAKEUP);
C:\C#SOUR~1\_#FC\EMG5er\Flowcode_Emg_5er_main1.o(.text+0x590):C:\C#SOUR~1\_#FC\EMG5er\Flowcode_Emg_5er_main1.c: undefined reference to `FCD_06c41_SPI_ADS99__SendChar'
undefined reference error
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: undefined reference error
Hello,
The problem is likely the function prefixes.
e.g.
FCD_0e742_
FCD_0e743_
Flowcode creates these so they are unique and so you can have multiple of the same component in your project without them causing problems with each other.
Check that these prefixes are correct in the projects that are not compiling and that should solve the problem for you.
The problem is likely the function prefixes.
e.g.
FCD_0e742_
FCD_0e743_
Flowcode creates these so they are unique and so you can have multiple of the same component in your project without them causing problems with each other.
Check that these prefixes are correct in the projects that are not compiling and that should solve the problem for you.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
Re: undefined reference error
Hi Ben
I have to import a lot of c code and change it to FC7 conform.
It's mostly sending a constants or variables to the spi_out.
the constants I creat it one by one and ad the hex Value......
But can I use C code with copy/paste for sending like
FCD_06c41_SPI_ADS99__SendChar(FCL_WAKEUP);
FCD_06c41_SPI_ADS99__SendChar(FCL_CH1SET);
I have to import a lot of c code and change it to FC7 conform.
It's mostly sending a constants or variables to the spi_out.
the constants I creat it one by one and ad the hex Value......
But can I use C code with copy/paste for sending like
FCD_06c41_SPI_ADS99__SendChar(FCL_WAKEUP);
FCD_06c41_SPI_ADS99__SendChar(FCL_CH1SET);
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: undefined reference error
Hi,
You are best calling Flowcode macros from an icon, but if you want to cut'n'paste lines, as in C, then you can put the calls into a calculation icon...
You are best calling Flowcode macros from an icon, but if you want to cut'n'paste lines, as in C, then you can put the calls into a calculation icon...
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
Re: undefined reference error
Hi Leigh
Perfect. "put the calls into a calculation Icon"
That what I'm looking for. It's working
The calculation Icon I use anyway. So my Flowcode now is very comfortable to use and read....
Perfect. "put the calls into a calculation Icon"
That what I'm looking for. It's working
The calculation Icon I use anyway. So my Flowcode now is very comfortable to use and read....
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
Re: undefined reference error
Hi Leigh
Thank you for the additional infos. Just for an info. More or less the same code.
Compare the first Pictures with all with Icon's and the second Pictures with variables and constants and the call's in calculation Icon.
That's really nice in Flowcode.
Thank you for the additional infos. Just for an info. More or less the same code.
Compare the first Pictures with all with Icon's and the second Pictures with variables and constants and the call's in calculation Icon.
That's really nice in Flowcode.
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: undefined reference error
You might also like to know that you can drag and drop component functions (macros) into the calculation box in the same way that you can with variables..