Author Topic: End of source file reached without closing comment */ symbol  (Read 2672 times)

0 Members and 1 Guest are viewing this topic.

Offline radhikaTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: in
Hello,
I build a code and i got hex file but after some time i again compile it, i get this error.
End of source file reached without closing comment */ symbol       

Look to this code and guide me that where i am wrong.
Code: [Select]
#include "18F4520.h"
#include <SSD1306.c>

#define adc=10
#define SSD1306_RST   PIN_D4

#fuses HS,NOWDT,NOPROTECT,NOLVP                       
#use delay(clock=8000000)
#use I2C(MASTER, I2C1, FAST = 400000, stream = SSD1306_STREAM)  // Initialize I2C

#define sclk PIN_D2
#define sdata PIN_D3
#define cs1 PIN_D1
#define cs2 PIN_D0

static int8 i = 0, j=1;
volatile unsigned long button_select, button_up, button_down;
uint8_t row_Ind, col_Ind;
int m1, m2, m3, m4;// menu select index 
uint8_t start_row;
unsigned int pwm1;
void SendPotValue (unsigned short num);
void senddac1 (unsigned int dac1);
void senddac2 (unsigned int dac2);
char *ADC = "0000";

unsigned int aa;
const char MESSAGE[] = "VOLUME:";

uint8_t const starting_row = 1;
uint8_t const starting_col = 3;
int spkr = 0;

void cursor(uint8_t index);  // move cursor to the xth row and first column
void menu1 ();
void charging_s1();
void charging_AC();
void charging_Solr();
void discharging_s1();
void discharging_USB();
void discharging_DC();
void discharging_AC();
void discharging_Spkr();
void spkr_Vol();
void menu1_Back();
void charging_s1_Back();
void discharging_s1_Back();
void spkr_Back();
void scroll_down();
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 4034
  • Country: 00
Re: End of source file reached without closing comment */ symbol
« Reply #1 on: June 18, 2019, 05:48:51 pm »
Syntax error well may be within any of these two files:

#include "18F4520.h"
 #include <SSD1306.c>

Which one of these two have you poked last time?

Also, including a C  file sound kind of weird. You sure what ya doin?
 

Offline radhikaTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: in
Re: End of source file reached without closing comment */ symbol
« Reply #2 on: June 18, 2019, 05:56:38 pm »
Syntax error well may be within any of these two files:

#include "18F4520.h"
 #include <SSD1306.c>

Which one of these two have you poked last time?

Also, including a C  file sound kind of weird. You sure what ya doin?

Now I use it like this,
#include <18F4520.h>
#include <SSD1306.c>

Ya. It's microcontroller coding with oled display ssd1306
 

Offline Wilksey

  • Super Contributor
  • ***
  • Posts: 1329
Re: End of source file reached without closing comment */ symbol
« Reply #3 on: June 18, 2019, 06:30:24 pm »
It would help us to help you if you post your full source, I see function prototypes but no functions.  :palm:
 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1724
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: End of source file reached without closing comment */ symbol
« Reply #4 on: June 18, 2019, 08:08:35 pm »
Check the files you are including, probably the error is in there.

Also, do not include .c files.  If the .c file is from a library, it is probable that it has a .h file associated with it.  You include that .h file and compile both .c files (your file and the library file) and then the linker will combine both objects and generate one simple firmware file
 

Offline radhikaTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: in
Re: End of source file reached without closing comment */ symbol
« Reply #5 on: June 19, 2019, 03:19:25 am »
It would help us to help you if you post your full source, I see function prototypes but no functions.  :palm:
The code is so big. It's error free. But the only error i get is this.
 

Offline radhikaTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: in
Re: End of source file reached without closing comment */ symbol
« Reply #6 on: June 19, 2019, 03:20:58 am »
Do you have // embedded between /* and */?
I don't even used */ this in whole codde. I only used // this. But I dont know what this error indicate.
 

Offline radhikaTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: in
Re: End of source file reached without closing comment */ symbol
« Reply #7 on: June 19, 2019, 03:34:59 am »
Check the files you are including, probably the error is in there.

Also, do not include .c files.  If the .c file is from a library, it is probable that it has a .h file associated with it.  You include that .h file and compile both .c files (your file and the library file) and then the linker will combine both objects and generate one simple firmware file
I made these changes, and i m still getting this error
Code: [Select]
#include "18F4520.h"
#include <stdint.h>


#define SSD1306_RST   PIN_D4

#fuses HS,NOWDT,NOPROTECT,NOLVP                       
#use delay(clock=8000000)
#use I2C(MASTER, I2C1, FAST = 400000, stream = SSD1306_STREAM)  // Initialize I2C

#define sclk PIN_D2
#define sdata PIN_D3
#define cs1 PIN_D1
#define cs2 PIN_D0

// Include SSD1306 OLED driver source code
#include <ssd1306.c>

 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1724
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: End of source file reached without closing comment */ symbol
« Reply #8 on: June 19, 2019, 03:40:29 am »
Can you attach ssd1306.c?
 

Offline radhikaTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: in
Re: End of source file reached without closing comment */ symbol
« Reply #9 on: June 19, 2019, 03:51:39 am »
Hello, people thanks for replying and guiding. There is */ missing in SSD1306.c file. I made i correct and code hass compiled ;D ;D
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->