Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Controlling run led problem
05-04-2013, 05:13 PM,
#21
RE: Controlling run led problem
(05-04-2013, 03:56 PM)regis Wrote:
Quote:G:\Program Files\Pinguino\source\main.asm:36:Error[113] Symbol not previously defined (_IO_init).
G:\Program Files\Pinguino\source\main.asm:37:Error[113] Symbol not previously defined (_IO_digital).
G:\Program Files\Pinguino\source\main.asm:334:Error[113] Symbol not previously defined (_IO_init).
G:\Program Files\Pinguino\source\main.asm:334:Error[113] Symbol not previously defined (_IO_init).
G:\Program Files\Pinguino\source\main.asm:336:Error[113] Symbol not previously defined (_IO_digital).
G:\Program Files\Pinguino\source\main.asm:336:Error[113] Symbol not previously defined (_IO_digital).
and
Quote:G:\Program Files\Pinguino\source\main.c:146: warning 112: function 'IO_init' implicit declaration
G:\Program Files\Pinguino\source\main.c:147: warning 112: function 'IO_digital' implicit declaration
G:\Program Files\Pinguino\source\main.c:146: warning 84: 'auto' variable 'IO_init' may be used before initialization
G:\Program Files\Pinguino\source\main.c:147: warning 84: 'auto' variable 'IO_digital' may be used before initialization
G:\Program Files\Pinguino\source\main.c:146: warning 84: 'auto' variable 'IO_init' may be used before initialization
G:\Program Files\Pinguino\source\main.c:147: warning 84: 'auto' variable 'IO_digital' may be used before initialization
means that SDCC can't link io.c.
You should have #include <io.c> in main.c and io.c in p8/pinguino/core.
Did you copy all the files from http://code.google.com/p/pinguino32/down...ip&can=2&q= over your files ?

Hi again,

I have the files. They are taken directly from the version 739
In the main.c I see the following definitions:


#include <pic18fregs.h>
#include <typedef.h>
#include <const.h>
#include <macro.h>

////////////////////////////////////////////////////////////////////////
#include "define.h"
////////////////////////////////////////////////////////////////////////

#include <pin.h> // needs define.h to be included first
#include <io.c> // needs define.h to be included first

////////////////////////////////////////////////////////////////////////
#include "user.c" // user's .pde file translated to C
////////////////////////////////////////////////////////////////////////

Could the different file addressing be the problem:
we have once <filename>, and once "filename".

Sorry for the stupid questions, but I am beginner :-)
Reply
05-04-2013, 06:04 PM,
#22
RE: Controlling run led problem
Don't worry, you don't bother me.
We are going to debug the code with some breakpoints.
If you place #error "**** BREAKPOINT ****" then SDCC will stop and you will see the message in the output window.
For example, in main.c, line 76 :
#if defined(__18f26j50) || defined(__18f46j50)
#error "**** BREAKPOINT ****"
u16 pll_startup_counter = 600;
#endif
SDCC will stop if your board is a Pinguin26j50 but will go on if your board is a Pinguino2550.
If you get an error message then the part of the code where you placed #error has been reached.
If you understand, try to place some breakpoints in io.c. For example, you know that SDCC complains it can not find IO_init(), so if you place #error in that function you should not get an error message. Try and tell me.

Good luck.

Just to be sure, tell me what board / bootloader you chose in the Board Selector (F9) ?
About #include syntax, FYI : http://en.wikipedia.org/wiki/Include_directive
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
05-04-2013, 06:25 PM, (This post was last modified: 05-04-2013, 06:38 PM by milencho.)
#23
RE: Controlling run led problem
(05-04-2013, 06:04 PM)regis Wrote: Don't worry, you don't bother me.
We are going to debug the code with some breakpoints.
If you place #error "**** BREAKPOINT ****" then SDCC will stop and you will see the message in the output window.
For example, in main.c, line 76 :
#if defined(__18f26j50) || defined(__18f46j50)
#error "**** BREAKPOINT ****"
u16 pll_startup_counter = 600;
#endif
SDCC will stop if your board is a Pinguin26j50 but will go on if your board is a Pinguino2550.
If you get an error message then the part of the code where you placed #error has been reached.
If you understand, try to place some breakpoints in io.c. For example, you know that SDCC complains it can not find IO_init(), so if you place #error in that function you should not get an error message. Try and tell me.

Good luck.

Just to be sure, tell me what board / bootloader you chose in the Board Selector (F9) ?
About #include syntax, FYI : http://en.wikipedia.org/wiki/Include_directive


Hi ,

I put the line:

#error "**** BREAKPOINT ****" in the place where you suggest me.
but in the output window I saw:

Board: Pinguino 2550
Proc: 18f2550
File: G:\Program Files\Pinguino\examples\01.Basics\Blink\Blink.pde
error while compiling
check highlighted lines in your code

so I put it directly at the first line after the header comment, before the
all include directives.
The result is the same...

Here is the stdout:

G:\Program Files\Pinguino\source\main.c:36:10: error: #error "**** BREAKPOINT ****"

G:/Program Files/Pinguino/p8/include/pinguino/core/digitalw.c:172: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:/Program Files/Pinguino/p8/include/pinguino/core/digitalw.c:172: WARNING: casting `(generic*)(non-pointer)' -- assuming __data space

G:/Program Files/Pinguino/p8/include/pinguino/core/digitalw.c:205: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:/Program Files/Pinguino/p8/include/pinguino/core/digitalw.c:238: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:/Program Files/Pinguino/p8/include/pinguino/core/digitalw.c:254: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:/Program Files/Pinguino/p8/include/pinguino/core/digitalw.c:258: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:/Program Files/Pinguino/p8/include/pinguino/core/digitalw.c:263: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:\Program Files\Pinguino\source\main.c:149: warning 112: function 'IO_init' implicit declaration

G:\Program Files\Pinguino\source\main.c:150: warning 112: function 'IO_digital' implicit declaration

G:\Program Files\Pinguino\source\main.c:149: warning 84: 'auto' variable 'IO_init' may be used before initialization

G:\Program Files\Pinguino\source\main.c:150: warning 84: 'auto' variable 'IO_digital' may be used before initialization

G:\Program Files\Pinguino\source\main.c:149: warning 84: 'auto' variable 'IO_init' may be used before initialization

G:\Program Files\Pinguino\source\main.c:150: warning 84: 'auto' variable 'IO_digital' may be used before initialization

(05-04-2013, 06:25 PM)milencho Wrote:
(05-04-2013, 06:04 PM)regis Wrote: Don't worry, you don't bother me.
We are going to debug the code with some breakpoints.
If you place #error "**** BREAKPOINT ****" then SDCC will stop and you will see the message in the output window.
For example, in main.c, line 76 :
#if defined(__18f26j50) || defined(__18f46j50)
#error "**** BREAKPOINT ****"
u16 pll_startup_counter = 600;
#endif
SDCC will stop if your board is a Pinguin26j50 but will go on if your board is a Pinguino2550.
If you get an error message then the part of the code where you placed #error has been reached.
If you understand, try to place some breakpoints in io.c. For example, you know that SDCC complains it can not find IO_init(), so if you place #error in that function you should not get an error message. Try and tell me.

Good luck.

Just to be sure, tell me what board / bootloader you chose in the Board Selector (F9) ?
About #include syntax, FYI : http://en.wikipedia.org/wiki/Include_directive


Hi ,

I put the line:

#error "**** BREAKPOINT ****" in the place where you suggest me.
but in the output window I saw:

Board: Pinguino 2550
Proc: 18f2550
File: G:\Program Files\Pinguino\examples\01.Basics\Blink\Blink.pde
error while compiling
check highlighted lines in your code

so I put it directly at the first line after the header comment, before the
all include directives.
The result is the same...

Here is the stdout:

G:\Program Files\Pinguino\source\main.c:36:10: error: #error "**** BREAKPOINT ****"

G:/Program Files/Pinguino/p8/include/pinguino/core/digitalw.c:172: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:/Program Files/Pinguino/p8/include/pinguino/core/digitalw.c:172: WARNING: casting `(generic*)(non-pointer)' -- assuming __data space

G:/Program Files/Pinguino/p8/include/pinguino/core/digitalw.c:205: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:/Program Files/Pinguino/p8/include/pinguino/core/digitalw.c:238: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:/Program Files/Pinguino/p8/include/pinguino/core/digitalw.c:254: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:/Program Files/Pinguino/p8/include/pinguino/core/digitalw.c:258: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:/Program Files/Pinguino/p8/include/pinguino/core/digitalw.c:263: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:\Program Files\Pinguino\source\main.c:149: warning 112: function 'IO_init' implicit declaration

G:\Program Files\Pinguino\source\main.c:150: warning 112: function 'IO_digital' implicit declaration

G:\Program Files\Pinguino\source\main.c:149: warning 84: 'auto' variable 'IO_init' may be used before initialization

G:\Program Files\Pinguino\source\main.c:150: warning 84: 'auto' variable 'IO_digital' may be used before initialization

G:\Program Files\Pinguino\source\main.c:149: warning 84: 'auto' variable 'IO_init' may be used before initialization

G:\Program Files\Pinguino\source\main.c:150: warning 84: 'auto' variable 'IO_digital' may be used before initialization

Sorry, I forgot :
My board is pic18f2550
I put bootloader ver 1.0 or 2.0
Reply
05-04-2013, 06:57 PM,
#24
RE: Controlling run led problem
(05-04-2013, 06:25 PM)milencho Wrote: G:\Program Files\Pinguino\source\main.c:36:10: error: #error "**** BREAKPOINT ****"

Ok, that's normal but you should get the same if you put a breakpoint in io.c just after all the includes ... Let me see your main.c
And what about this space in your path ? Did you try to place your copy of Pinguino somewhere else than in "Program Files" ?
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
05-04-2013, 07:55 PM,
#25
RE: Controlling run led problem
(05-04-2013, 06:57 PM)regis Wrote:
(05-04-2013, 06:25 PM)milencho Wrote: G:\Program Files\Pinguino\source\main.c:36:10: error: #error "**** BREAKPOINT ****"

Ok, that's normal but you should get the same if you put a breakpoint in io.c just after all the includes ... Let me see your main.c
And what about this space in your path ? Did you try to place your copy of Pinguino somewhere else than in "Program Files" ?

I have moved the whole folder to G:\Pinguino;
The same result...

I removed the #error "**** BREAKPOINT ****" line from the main.c and
I put in io.c
So the stdout looks: The error "**** BREAKPOINT ****" is not seen

G:\Pinguino\source\main.asm:36:Error[113] Symbol not previously defined (_IO_init).

G:\Pinguino\source\main.asm:37:Error[113] Symbol not previously defined (_IO_digital).

G:\Pinguino\source\main.asm:334:Error[113] Symbol not previously defined (_IO_init).

G:\Pinguino\source\main.asm:334:Error[113] Symbol not previously defined (_IO_init).

G:\Pinguino\source\main.asm:336:Error[113] Symbol not previously defined (_IO_digital).

G:\Pinguino\source\main.asm:336:Error[113] Symbol not previously defined (_IO_digital).

G:/Pinguino/p8/include/pinguino/core/digitalw.c:172: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:/Pinguino/p8/include/pinguino/core/digitalw.c:172: WARNING: casting `(generic*)(non-pointer)' -- assuming __data space

G:/Pinguino/p8/include/pinguino/core/digitalw.c:205: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:/Pinguino/p8/include/pinguino/core/digitalw.c:238: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:/Pinguino/p8/include/pinguino/core/digitalw.c:254: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:/Pinguino/p8/include/pinguino/core/digitalw.c:258: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:/Pinguino/p8/include/pinguino/core/digitalw.c:263: warning 154: converting integral to pointer without a cast

from type 'int register'

to type 'unsigned-char generic* fixed'

G:\Pinguino\source\main.c:147: warning 112: function 'IO_init' implicit declaration

G:\Pinguino\source\main.c:148: warning 112: function 'IO_digital' implicit declaration

G:\Pinguino\source\main.c:147: warning 84: 'auto' variable 'IO_init' may be used before initialization

G:\Pinguino\source\main.c:148: warning 84: 'auto' variable 'IO_digital' may be used before initialization

G:\Pinguino\source\main.c:147: warning 84: 'auto' variable 'IO_init' may be used before initialization

G:\Pinguino\source\main.c:148: warning 84: 'auto' variable 'IO_digital' may be used before initialization


Attached Files
.c   main.c (Size: 8.91 KB / Downloads: 1)
.c   io.c (Size: 6.05 KB / Downloads: 1)
Reply
05-04-2013, 08:44 PM,
#26
RE: Controlling run led problem
Files are the same just as expected.
I get stuck ...

Do you have 32- or 64-bit Windows ?
Go to win32/p8/bin and try sdcc -v and gpasm -v.
Do you get this ?

C:\pinguino\x.4\win32\p8\bin>sdcc -v
SDCC : pic16 3.2.1 #8392 (Jan 21 2013) (MINGW32)

C:\pinguino\x.4\win32\p8\bin>gpasm -v
gpasm-1.0.0 #932 (Jan 21 2013)
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
05-04-2013, 09:00 PM,
#27
RE: Controlling run led problem
(05-04-2013, 08:44 PM)regis Wrote: Files are the same just as expected.
I get stuck ...

Do you have 32- or 64-bit Windows ?
Go to win32/p8/bin and try sdcc -v and gpasm -v.
Do you get this ?

C:\pinguino\x.4\win32\p8\bin>sdcc -v
SDCC : pic16 3.2.1 #8392 (Jan 21 2013) (MINGW32)

C:\pinguino\x.4\win32\p8\bin>gpasm -v
gpasm-1.0.0 #932 (Jan 21 2013)

Here are the results (see the attachment)...

Could the reason be somewhere in the full path definition for the included files? Where is this done?

Regards
milencho


Attached Files Thumbnail(s)
   
Reply
05-04-2013, 09:15 PM,
#28
RE: Controlling run led problem
(05-04-2013, 09:00 PM)milencho Wrote: Could the reason be somewhere in the full path definition for the included files? Where is this done?

No, I don't think so because it's done in wxgui/pinguino.py and this file is a part of the update you installed yesterday.

But ... your binaries are not the same as I have and that's probably the origin of the problem.
Please send me a PM with your email and I will send you all the binaries or try to get them from the svn server (with TortoiseSVN for ex.).
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
05-04-2013, 09:44 PM,
#29
RE: Controlling run led problem
(05-04-2013, 09:15 PM)regis Wrote:
(05-04-2013, 09:00 PM)milencho Wrote: Could the reason be somewhere in the full path definition for the included files? Where is this done?

No, I don't think so because it's done in wxgui/pinguino.py and this file is a part of the update you installed yesterday.

But ... your binaries are not the same as I have and that's probably the origin of the problem.
Please send me a PM with your email and I will send you all the binaries or try to get them from the svn server (with TortoiseSVN for ex.).

Hi Regis,

Thanks for the files - I have replaced the whole bin folder.
I think that there is improvement :-)

the stdout file:
'sdcpp' is not recognized as an internal or external command,

operable program or batch file.

at 1: warning 190: ISO C forbids an empty source file


the output is the previous...:
Board: Pinguino 2550
Proc: 18f2550
File: G:\Pinguino\examples\01.Basics\Blink\Blink.pde
error while compiling
check highlighted lines in your code
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)