darrylb123 / blackboard-STC15

6 stars 5 forks source link

Unable to Compile #1

Open matt2005 opened 7 years ago

matt2005 commented 7 years ago

I'm having trouble compiling. I'm using a RPi with Debian Jessie. Here is the error after editing the makefile to used sdcc instead of sdcc-sdcc

sdcc -c main.c
delay.h:7: syntax error: token -> 'Delay2' ; column 18
Makefile:13: recipe for target 'main.rel' failed
make: *** [main.rel] Error 1

Here is the output from the sdcc-v command

SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/TININative/ds400/hc08/s08/stm8                    3.4.0 #8981 (Jul 11 2014) (Linux)
published under GNU General Public License (GPL)

I have also tried compiling on windows via cygwin, however i get a different error.

sdcc -c main.c
main.c:20: error 98: conflict with previous definition of 'putchar' for attribute 'type'
from type 'int function ( int fixed) fixed'
  to type 'void function ( unsigned-char fixed) fixed'
Makefile:13: recipe for target 'main.rel' failed
make: *** [main.rel] Error 1

Windows is using the following version

sdcc -v
SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.6.5 #9842 (MINGW64)
published under GNU General Public License (GPL)

I have managed to get it to compile under windows by commenting out the putchar function in main.c but i think this has broken something else.

darrylb123 commented 7 years ago

Debian Jessie has sdcc 3.4 while Fedora uses 3.6 The older version needed an extra compiler option to handle inline functions. I can compile on RPi raspian jessie with this option set. You will still need to change the Makefile to make sdcc-sdcc into sdcc for debian. I've tested the compile on Fedora to and it still compiles with the --std-c99 compiler option. I have not downloaded it into the target. Let me know how you go.

git pull to get the revised Makefile

Darryl

matt2005 commented 7 years ago

It now compiles but it doesn't seem to work, after flashing the DTC and ESP. Then power on with the jumpers in the original positions WiFi Rx and tx the unit beeps once and the 3 LEDs light up but nothing else, WiFi has been assigned IP but IP not presenting http. Could this be compilation issue?

darrylb123 commented 7 years ago

Does the ESP download correctly from the Arduino IDE? I'd be confirming that some of the demo sketches work first on the ESP side.

On Fri, Mar 10, 2017, 8:23 AM matt2005 notifications@github.com wrote:

It now compiles but it doesn't seem to work, after flashing the DTC and ESP. Then power on with the jumpers in the original positions WiFi Rx and tx the unit beeps once and the 3 LEDs light up but nothing else, WiFi has been assigned IP but IP not presenting http. Could this be compilation issue?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/darrylb123/blackboard-STC15/issues/1#issuecomment-285502906, or mute the thread https://github.com/notifications/unsubscribe-auth/AGcqVSMVxoPGS2_4oEm9gyGfd4loN8b3ks5rkHvbgaJpZM4MXWvf .

matt2005 commented 7 years ago

Yes ESP works fine, can you add a compiled version for the STC.

darrylb123 commented 7 years ago

There you go. Do another git pull.

darrylb123 commented 7 years ago

I don't understand your error. If the ESP does not respond to http requests, this is nothing to do with the STC. The ESP simply reads a memory region that is updated ny the modbus protocol. Does the ESP respond to pings?

matt2005 commented 7 years ago

I've worked out the issue. I needed to power the module via a 5v adaptor and not via the battery pack.

The ESP module was not initiating correctly, i ended up only being able to connect at 74880 baud and then i was able to see the boot crash.

Maybe update the instructions to include this?

darrylb123 commented 7 years ago

Ok, I haven't powered it off the batteries.

On Sun, 12 Mar 2017, 10:03 matt2005 notifications@github.com wrote:

I've worked out the issue. I needed to power the module via a 5v adaptor and not via the battery pack.

The ESP module was not initiating correctly, i ended up only being able to connect at 74880 baud and then i was able to see the boot crash.

Maybe update the instructions to include this?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/darrylb123/blackboard-STC15/issues/1#issuecomment-285910460, or mute the thread https://github.com/notifications/unsubscribe-auth/AGcqVU4znlNQ2IFOMxnMlm8BRvIElr0lks5rkzZAgaJpZM4MXWvf .

codedmind commented 6 years ago

Hello, when trying to flash the main.ihx i only see the msg

Waiting for MCU, please cycle power:

And everything is connect.. only ear the anoyin beep... any help?

Thanks