Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Re: Sweeperino?
Jack Purdum
Matjaz: The Arduino GNU compiler performs type checking on function arguments, which means it needs to have what is called a function prototype. For example, suppose you write a function named MySquare() that takes an integer variable as its argument: int MySquare(int number) { ?? return number * number; } The compiler needs to know things about this function before it can properly compile the program. To fix this, add this line at the very top of your program: long MySquare(int number);??????????? // This is a function prototype for MySquare() When the compiler reads the function prototype, it takes the attributes of the function (e.g., it returns a long, it takes an int as an argument, and its ID is MyFunction) and stores that information in something called a symbol table. Later in the program when you use this function, the compiler can look in the symbol table to check that you're passing the correct data type to it (int) and assigning what is returned from the function into a matching (long) data type The error in yellow below is an example of the compiler not finding a function prototype. The first error means that the definition of xtal_freq_calibrated was not found in the compiler's symbol table by the time it reached that point in the program. If this is someone else's code that you copied, this could be as simple as misspelling the variable name. Whatever the reason, it's caused by that variable not being in the symbol table. To more fully understand these types of errors, try reading: and see if that helps. Jack, W8TEE (aka econjack)
On Friday, February 15, 2019, 9:25:09 AM EST, matjaz via Groups.Io <matjaz_zejn@...> wrote:
Hello, I try to compile antuino, but recevied many errors. Best regards Matjaz C:\antuino\antuino-master\antuino_analyzer_27mhz_v2\antuino_analyzer_27mhz_v2.ino: In function 'int calibrateClock()': antuino_analyzer_27mhz_v2:62: error: 'xtal_freq_calibrated' was not declared in this scope ? prev_calibration = xtal_freq_calibrated; ? ? ? ? ? ? ? ? ? ? ? ^ antuino_analyzer_27mhz_v2:65: error: 'si5351aSetFrequency_clk1' was not declared in this scope ? si5351aSetFrequency_clk1(10000000l);? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^ C:\antuino\antuino-master\antuino_analyzer_27mhz_v2\antuino_analyzer_27mhz_v2.ino: In function 'void takeReading(long int)': antuino_analyzer_27mhz_v2:300: error: 'si5351aSetFrequency_clk2' was not declared in this scope ? ? ? si5351aSetFrequency_clk2(local_osc);? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^ antuino_analyzer_27mhz_v2:304: error: 'si5351aSetFrequency_clk0' was not declared in this scope ? ? ? si5351aSetFrequency_clk0(newfreq); ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^ antuino_analyzer_27mhz_v2:311: error: 'si5351aSetFrequency_clk1' was not declared in this scope ? ? ? si5351aSetFrequency_clk1(newfreq); ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^ C:\antuino\antuino-master\antuino_analyzer_27mhz_v2\antuino_analyzer_27mhz_v2.ino: In function 'void setup()': antuino_analyzer_27mhz_v2:326: error: 'xtal_freq_calibrated' was not declared in this scope ? EEPROM.get(MASTER_CAL, xtal_freq_calibrated); ? ? ? ? ? ? ? ? ? ? ? ? ? ^ antuino_analyzer_27mhz_v2:352: error: 'si5351aOutputOff' was not declared in this scope ? si5351aOutputOff(SI_CLK0_CONTROL); ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^ C:\antuino\antuino-master\antuino_analyzer_27mhz_v2\antuino_analyzer_27mhz_v2.ino: In function 'int menuSelectAntAnalyzer(int)': antuino_analyzer_27mhz_v2:535: error: 'si5351aOutputOff' was not declared in this scope ? ? si5351aOutputOff(SI_CLK0_CONTROL); ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^ C:\antuino\antuino-master\antuino_analyzer_27mhz_v2\antuino_analyzer_27mhz_v2.ino: In function 'int menuCalibrate2(int)': antuino_analyzer_27mhz_v2:594: error: 'si5351aOutputOff' was not declared in this scope ? ? si5351aOutputOff(SI_CLK0_CONTROL); ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^ C:\antuino\antuino-master\antuino_analyzer_27mhz_v2\antuino_analyzer_27mhz_v2.ino: In function 'int menuSelectMeasurementRx(int)': antuino_analyzer_27mhz_v2:614: error: 'si5351aOutputOff' was not declared in this scope ? ? si5351aOutputOff(SI_CLK0_CONTROL); ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^ C:\antuino\antuino-master\antuino_analyzer_27mhz_v2\antuino_analyzer_27mhz_v2.ino: In function 'int menuSelectNetworkAnalyzer(int)': antuino_analyzer_27mhz_v2:633: error: 'si5351aOutputOff' was not declared in this scope ? ? si5351aOutputOff(SI_CLK1_CONTROL);? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^ exit status 1 'xtal_freq_calibrated' was not declared in this scope On Fri, 15 Feb 2019 18:05:46 +0530, "Ashhar Farhan" <farhanbox@...> wrote: > Of all, this should be your first project. It will all the others.- f > On Fri 15 Feb, 2019, 5:56 PM gerrykav via Groups.Io > > Links: > ------ > [1] mailto:[email protected] > [2] /g/BITX20/message/65375 > [3] > mailto:[email protected]?subject=Re:%20Re%3A%20%5BBITX20%5D%20Sweeperino%3F > [4] > mailto:farhanbox@...?subject=Private:%20Re:%20Re%3A%20%5BBITX20%5D%20Sweeperino%3F > [5] /mt/29791995/180494 > [6] /g/BITX20/post > [7] > [8] > [9] > [10] > [11] > [12] /g/BITX20/wiki/home > [13] /g/BITX20/editsub/180494 > [14] mailto:BITX20+[email protected] > [15] /g/BITX20/leave/defanged |
to navigate to use esc to dismiss