Hmmm... I hadn't tried EEPROM programming with the alternate clock settings. I'll try it later.
Have given this some great thought.
Surely the answer lies with the prop end of the loader.
If it could determine the crystal frequency after it was download then adjust itself to work with it.
Maybe then the user program would download and run albeit at the wrong speed.
All the user need do then is have the first few lines of their code check the frequency and adjust if required.
Don't know if this is possible but seems feasible to me.
I'm sorry but I won't have time to look at this for a few days. However, the code that is in the Parallax GitHub repository is the current code. The only changes not reflected in that code is the work I've been doing to get the clock parameters from the header of the binary file being loaded. I can't push those changes until I consult with Parallax.
77 ' compute the ticks per bit from the baudrate
78 baudrate := clkfreq / baudrate
should read
78 bitticks:= clkfreq / baudrate ' Calculates clk pulses per bit
allowing the driver to adapt to differing clock speeds.
I'm afraid I don't have the setup to test this but it may solve my problem without altering the header files.
If it works then my project C code would just need the first few instructions to adjust clock speed after loading.
I just pushed a bunch of changes to the proploader repository. The main one is that proploader now defaults to getting clock settings from the binary file being loaded unless you specify a board configuration file using the command line option -b. In that case it will get its clock settings from the config file. The fast loader seems to work on all of the boards I've tried including the ActivityBoard, the Flip, and the Hydra. For the Hydra you need to invoke proploader with the "-b hydra" option and have the hydra.cfg file that comes with SimpleIDE. Failing that, you can use the INITIAL_CLKMODE macro I posted elsewhere to cause the clock mode to be XTAL1+PLL8X in the binary file.
I'm thinking of just getting rid of the new "clock-settings" config variable and keying off of the existence of the "clkfreq" and "clkmode" variables to decide whether to use the values in the binary. It seems like clock-settings is redundant.
Works for me, just clicked it now. (its probably the port) use 80! lol
ya know.. im just gonna delete the whole repo locally..... this reset hard head business seems to get me in trouble.
worked..
Odd, when I tried to update the head using
git reset --hard HEAD
git clean -xffd
git pull
When I tried to compile the rpi version I TOO ran into an issue.
So i deleted the whole thing and ran git clone again. And all compile fine now. (win32 linux and rpi)
So many tricks, so little time to learn about them all.
Jetbrains... i feel like jetbrains keeping up with it all. now i havta read about this...
Indeed I am quite the JetBrains fanboy. But only because they make good products! I do try to keep up with a lot of different products (JetBrains competitors) and JetBrains is consistently with the best of them and usually better than the best of them. Their code review tool (Upsource) is great too.
dang,... you have more in here... oh is that not public... sorry.. no idea.
All public. I actually just added more to the public view - no reason for it to be private. There's just one private build left, and that's my PropWare IDE server because no one else ever needs to be aware of its build status :P
Works for me, just clicked it now. (its probably the port) use 80! lol
If I ever change the port, it will be because I figured out how to get lets-encrypt + apache + TeamCity working. Apache is already serving up many other sites from the same server, so 80 and 443 are already in use. I'd love to get TeamCity sitting behind Apache and secured through Let's Encrypt, but haven't bothered taking the time to learn apache (my wonderful dad, a life-long sys admin, did most of the setup for the server, i just manage my own stuff like TeamCity).
I just pushed some new changes. I've removed the clock-settings variable. Now proploader uses the clkfreq and clkmode from the config file if one was specified and otherwise uses the settings from the binary file being loaded. There are also some new variables fast-loader-clkfreq and fast-loader-clkmode in case you want the fast loader to use different settings than the program being loaded. This could be useful if your program uses RCFAST at runtime but has a crystal and can take advantage of the fast loader at load time.
I still haven't looked at the EEPROM programming problem. I'll do that next. Lastly, I'm going to add an option to allow bypassing the fast loader entirely. This would be useful for loading a program onto a board that doesn't have a crystal where the fast loader would never work anyway.
These changes mean that the following command line would work for loading a program onto a Hydra board:
I just pushed a fix for the EEPROM programming issue. I was able to successfully program the EEPROM on my Hydra board. There is still some work to be done to allow programming boards that don't use an 80mhz clock but this should work for the Hydra and any other boards that run at 80mhz.
I've just installed C compiler on my computer under windows 7.
20 years since I did any C programming. Think my setup is correct.
Have tried to compile Proploader from Github & the compiler can't find IP_Loader.h
I have looked at the Github src files and its not there but there is an IP_Loader.spin amongst the spin files.
After my last error I'm being cautious. Is it missing? or am I doing something wrong?
$ make
make: git: Command not found
make: git: Command not found
VERSION (2018-12-01 21:30:01)
make: git: Command not found
gcc -Wall -DVERSION=\"" (2018-12-01 21:30:01)"\" -DMINGW -I/home/Bobby/proploader-msys-build/obj tools/split.c -o /home/Bobby/proploader-msys-build/bin/split.exe
cd spin/; openspin -o /home/Bobby/proploader-msys-build/obj/IP_Loader.binary IP_Loader.spin
Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
Version 1.00.78 Compiled on May 28 2016 12:06:45
Compiling...
IP_Loader.spin
Done.
Program size is 856 bytes
/home/Bobby/proploader-msys-build/bin/split.exe /home/Bobby/proploader-msys-build/obj/IP_Loader.binary /home/Bobby/proploader-msys-build/obj/IP_Loader.h
error: can't open '/home/Bobby/proploader-msys-build/obj/IP_Loader.binary'
make: *** [Makefile:155: /home/Bobby/proploader-msys-build/obj/IP_Loader.h] Error 1
Have tried to compile latest version of Openspin without success.
$ make
make -C PropellerCompiler CROSS= BUILD=/home/Bobby/OpenSpin-master/build/PropellerCompiler all
make[1]: Entering directory '/home/Bobby/OpenSpin-master/PropellerCompiler'
g++ -Wall -g -o /home/Bobby/OpenSpin-master/build/PropellerCompiler/SymbolEngine.o -c SymbolEngine.cpp
In file included from PropellerCompilerInternal.h:16:0,
from SymbolEngine.cpp:13:
SymbolEngine.cpp: In member function ‘SymbolTableEntry* SymbolEngine::FindSymbol(const char*)’:
PropellerCompiler.h:31:18: error: ‘stricmp’ was not declared in this scope
#define _stricmp stricmp
^
SymbolEngine.cpp:351:13: note: in expansion of macro ‘_stricmp’
if (_stricmp(pSymbol->m_data.name, pSymbolName) == 0)
^~~~~~~~
PropellerCompiler.h:31:18: note: suggested alternative: ‘strncmp’
#define _stricmp stricmp
^
SymbolEngine.cpp:351:13: note: in expansion of macro ‘_stricmp’
if (_stricmp(pSymbol->m_data.name, pSymbolName) == 0)
^~~~~~~~
PropellerCompiler.h:31:18: error: ‘stricmp’ was not declared in this scope
#define _stricmp stricmp
^
SymbolEngine.cpp:364:13: note: in expansion of macro ‘_stricmp’
if (_stricmp(pSymbol->m_data.name, pSymbolName) == 0)
^~~~~~~~
PropellerCompiler.h:31:18: note: suggested alternative: ‘strncmp’
#define _stricmp stricmp
^
SymbolEngine.cpp:364:13: note: in expansion of macro ‘_stricmp’
if (_stricmp(pSymbol->m_data.name, pSymbolName) == 0)
^~~~~~~~
PropellerCompiler.h:31:18: error: ‘stricmp’ was not declared in this scope
#define _stricmp stricmp
^
SymbolEngine.cpp:377:13: note: in expansion of macro ‘_stricmp’
if (_stricmp(pSymbol->m_data.name, pSymbolName) == 0)
^~~~~~~~
PropellerCompiler.h:31:18: note: suggested alternative: ‘strncmp’
#define _stricmp stricmp
^
SymbolEngine.cpp:377:13: note: in expansion of macro ‘_stricmp’
if (_stricmp(pSymbol->m_data.name, pSymbolName) == 0)
^~~~~~~~
make[1]: *** [Makefile:67: /home/Bobby/OpenSpin-master/build/PropellerCompiler/SymbolEngine.o] Error 1
make[1]: Leaving directory '/home/Bobby/OpenSpin-master/PropellerCompiler'
make: *** [Makefile:52: build/PropellerCompiler/libopenspin.a] Error 2
IP_Loader.h gets created during the make process. It appears to be a hex dump (as an array of bytes) of the IP_Loader.spin compiled binary that gets used by the loader. Take a look in the Makefile to see where on your system that files gets stored.
As an example: On a macOS system, all built files get placed in a directory named "proploader-macosx-build" that is created at the same level in the file system as the PropLoader directory. On WIN, there should be a similar path to that file. You may need to modify the the Makefile or set the path to an environment variable before you run make.
IP_Loader.h gets created during the make process. It appears to be a hex dump (as an array of bytes) of the IP_Loader.spin compiled binary that gets used by the loader. Take a look in the Makefile to see where on your system that files gets stored.
As an example: On a macOS system, all built files get placed in a directory named "proploader-macosx-build" that is created at the same level in the file system as the PropLoader directory. On WIN, there should be a similar path to that file. You may need to modify the the Makefile or set the path to an environment variable before you run make.
dgately
Yes, that is exactly correct. It is a generated file. You need openspin installed to build PropLoader.
Comments
Thank You
Your totally correct. Without a fixed reference there is no way of working it out.
Bob
Have been looking at the code for the proploader on Github. Is this the upto date version.
I have found a typo in the SPIN code of the Packet Driver.
1 ''*********************************************
2 ''* Packet Driver *
3 ''* (C) 2011 David Betz *
4 ''* Based on: *
5 ''* Full-Duplex Serial Driver v1.1 Extended *
6 ''* (C) 2006 Parallax, Inc. *
7 ''*********************************************
76
77 ' compute the ticks per bit from the baudrate
78 baudrate := clkfreq / baudrate
Has this been resolved in the released version.
Bob
PS If this isn't the latest could I please have a copy of the latest to look at.
Thank you
Bob
77 ' compute the ticks per bit from the baudrate
78 baudrate := clkfreq / baudrate
should read
78 bitticks:= clkfreq / baudrate ' Calculates clk pulses per bit
allowing the driver to adapt to differing clock speeds.
I'm afraid I don't have the setup to test this but it may solve my problem without altering the header files.
If it works then my project C code would just need the first few instructions to adjust clock speed after loading.
Bob
First time ever done that hope I did it correctly.
Bob
Also, this should work:
Thank you for that.
Can I be a nuisance but could you please post a windows exe of the updated proploader as I cant currently bulid one myself.
Thank you in anticipation.
Bob
http://david.zemon.name:8111/repository/download/PropLoader_WindowsX86/2520:id/proploader.zip?guest=1
will test and confirm if working.
Bob
So many tricks, so little time to learn about them all.
Jetbrains... i feel like jetbrains keeping up with it all. now i havta read about this...
dang,... you have more in here... oh is that not public... sorry.. no idea.
Works for me, just clicked it now. (its probably the port) use 80! lol
ya know.. im just gonna delete the whole repo locally..... this reset hard head business seems to get me in trouble.
worked..
Odd, when I tried to update the head using
When I tried to compile the rpi version I TOO ran into an issue.
So i deleted the whole thing and ran git clone again. And all compile fine now. (win32 linux and rpi)
Tried version from your link and still loads OK into RAM but fails into EEPROM
Project Directory: K:/Bob Project/19-11-2018/
SimpleIDE Version 1.1.2
C:/Users/Bobby/Documents/SimpleIDE/Learn/Simple Libraries/
C:/Users/Bobby/Documents/SimpleIDE/ Updated on: 2018-10-23
propeller-elf-gcc.exe -v GCC 4.6.1 (propellergcc_v1_0_0_2408)
openspin.exe -c -I C:/Program Files (x86)/SimpleIDE/bin/../propeller-gcc/spin/ -o cmm/Pulse1Hz.dat Pulse1Hz.spin
Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
Version 1.00.78 Compiled on May 28 2016 12:06:45
Compiling...
Pulse1Hz.spin
Done.
Program size is 44 bytes
propeller-elf-objcopy -I binary -B propeller -O propeller-elf-gcc --redefine-sym _binary_cmm_Pulse1Hz_dat_start=_binary_Pulse1Hz_dat_start --redefine-sym _binary_cmm_Pulse1Hz_dat_end=_binary_Pulse1Hz_dat_end --redefine-sym _binary_cmm_Pulse1Hz_dat_size=_binary_Pulse1Hz_dat_size cmm/Pulse1Hz.dat cmm/Pulse1Hz_firmware.o
propeller-elf-gcc.exe -I . -L . -I C:/Users/Bobby/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools -L C:/Users/Bobby/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools/cmm/ -I C:/Users/Bobby/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext -L C:/Users/Bobby/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext/cmm/ -I C:/Users/Bobby/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c -L C:/Users/Bobby/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c/cmm/ -o cmm/BeatTimeInC_FullyWorking_01-11-2018_08_00 (1).elf -Os -mcmm -m32bit-doubles -fno-exceptions cmm/Pulse1Hz_firmware.o BeatTimeInC_FullyWorking_01-11-2018_08_00 (1).c -lsimpletools -lsimpletext -lsimplei2c -lsimpletools -lsimpletext -lsimpletools
propeller-load -s cmm/BeatTimeInC_FullyWorking_01-11-2018_08_00 (1).elf
propeller-elf-objdump -h cmm/BeatTimeInC_FullyWorking_01-11-2018_08_00 (1).elf
Done. Build Succeeded!
proploader.exe -e -r -I C:/Program Files (x86)/SimpleIDE/bin/../propeller-gcc/propeller-load/ -b bob -p COM3 cmm/BeatTimeInC_FullyWorking_01-11-2018_08_00 (1).elf
Opening file 'cmm/BeatTimeInC_FullyWorking_01-11-2018_08_00 (1).elf'Downloading file to port COM3
10260 bytes sent
Verifying RAM
Programming EEPROM
ERROR: EEPROM checksum failed
ERROR: Download failed
10260 bytes sent
Verifying RAM
Programming EEPROM
ERROR: EEPROM checksum failed
ERROR: Download failed
Bob
Bob
Indeed I am quite the JetBrains fanboy. But only because they make good products! I do try to keep up with a lot of different products (JetBrains competitors) and JetBrains is consistently with the best of them and usually better than the best of them. Their code review tool (Upsource) is great too.
All public. I actually just added more to the public view - no reason for it to be private. There's just one private build left, and that's my PropWare IDE server because no one else ever needs to be aware of its build status :P
If I ever change the port, it will be because I figured out how to get lets-encrypt + apache + TeamCity working. Apache is already serving up many other sites from the same server, so 80 and 443 are already in use. I'd love to get TeamCity sitting behind Apache and secured through Let's Encrypt, but haven't bothered taking the time to learn apache (my wonderful dad, a life-long sys admin, did most of the setup for the server, i just manage my own stuff like TeamCity).
I still haven't looked at the EEPROM programming problem. I'll do that next. Lastly, I'm going to add an option to allow bypassing the fast loader entirely. This would be useful for loading a program onto a board that doesn't have a crystal where the fast loader would never work anyway.
These changes mean that the following command line would work for loading a program onto a Hydra board: Either that or just use this command if you have a hydra.cfg file:
I've just installed C compiler on my computer under windows 7.
20 years since I did any C programming. Think my setup is correct.
Have tried to compile Proploader from Github & the compiler can't find IP_Loader.h
I have looked at the Github src files and its not there but there is an IP_Loader.spin amongst the spin files.
After my last error I'm being cautious. Is it missing? or am I doing something wrong?
$ make
make: git: Command not found
make: git: Command not found
VERSION (2018-12-01 21:30:01)
make: git: Command not found
gcc -Wall -DVERSION=\"" (2018-12-01 21:30:01)"\" -DMINGW -I/home/Bobby/proploader-msys-build/obj tools/split.c -o /home/Bobby/proploader-msys-build/bin/split.exe
cd spin/; openspin -o /home/Bobby/proploader-msys-build/obj/IP_Loader.binary IP_Loader.spin
Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
Version 1.00.78 Compiled on May 28 2016 12:06:45
Compiling...
IP_Loader.spin
Done.
Program size is 856 bytes
/home/Bobby/proploader-msys-build/bin/split.exe /home/Bobby/proploader-msys-build/obj/IP_Loader.binary /home/Bobby/proploader-msys-build/obj/IP_Loader.h
error: can't open '/home/Bobby/proploader-msys-build/obj/IP_Loader.binary'
make: *** [Makefile:155: /home/Bobby/proploader-msys-build/obj/IP_Loader.h] Error 1
Have tried to compile latest version of Openspin without success.
$ make
make -C PropellerCompiler CROSS= BUILD=/home/Bobby/OpenSpin-master/build/PropellerCompiler all
make[1]: Entering directory '/home/Bobby/OpenSpin-master/PropellerCompiler'
g++ -Wall -g -o /home/Bobby/OpenSpin-master/build/PropellerCompiler/SymbolEngine.o -c SymbolEngine.cpp
In file included from PropellerCompilerInternal.h:16:0,
from SymbolEngine.cpp:13:
SymbolEngine.cpp: In member function ‘SymbolTableEntry* SymbolEngine::FindSymbol(const char*)’:
PropellerCompiler.h:31:18: error: ‘stricmp’ was not declared in this scope
#define _stricmp stricmp
^
SymbolEngine.cpp:351:13: note: in expansion of macro ‘_stricmp’
if (_stricmp(pSymbol->m_data.name, pSymbolName) == 0)
^~~~~~~~
PropellerCompiler.h:31:18: note: suggested alternative: ‘strncmp’
#define _stricmp stricmp
^
SymbolEngine.cpp:351:13: note: in expansion of macro ‘_stricmp’
if (_stricmp(pSymbol->m_data.name, pSymbolName) == 0)
^~~~~~~~
PropellerCompiler.h:31:18: error: ‘stricmp’ was not declared in this scope
#define _stricmp stricmp
^
SymbolEngine.cpp:364:13: note: in expansion of macro ‘_stricmp’
if (_stricmp(pSymbol->m_data.name, pSymbolName) == 0)
^~~~~~~~
PropellerCompiler.h:31:18: note: suggested alternative: ‘strncmp’
#define _stricmp stricmp
^
SymbolEngine.cpp:364:13: note: in expansion of macro ‘_stricmp’
if (_stricmp(pSymbol->m_data.name, pSymbolName) == 0)
^~~~~~~~
PropellerCompiler.h:31:18: error: ‘stricmp’ was not declared in this scope
#define _stricmp stricmp
^
SymbolEngine.cpp:377:13: note: in expansion of macro ‘_stricmp’
if (_stricmp(pSymbol->m_data.name, pSymbolName) == 0)
^~~~~~~~
PropellerCompiler.h:31:18: note: suggested alternative: ‘strncmp’
#define _stricmp stricmp
^
SymbolEngine.cpp:377:13: note: in expansion of macro ‘_stricmp’
if (_stricmp(pSymbol->m_data.name, pSymbolName) == 0)
^~~~~~~~
make[1]: *** [Makefile:67: /home/Bobby/OpenSpin-master/build/PropellerCompiler/SymbolEngine.o] Error 1
make[1]: Leaving directory '/home/Bobby/OpenSpin-master/PropellerCompiler'
make: *** [Makefile:52: build/PropellerCompiler/libopenspin.a] Error 2
Bob
As an example: On a macOS system, all built files get placed in a directory named "proploader-macosx-build" that is created at the same level in the file system as the PropLoader directory. On WIN, there should be a similar path to that file. You may need to modify the the Makefile or set the path to an environment variable before you run make.
dgately