Where is load_cog_driver_xmm
Mark Mara
Posts: 64
I am looking at the cog_c_toggle demo as an example of how to start a cog when using XMMC. The demo code has a #if defined to switch between cognew and load_cog_driver_xmm, however, when I compile it using load_cog_driver_xmm I get an undefined reference. I do have Auto Include Liberies checked.
Thanks for your help.
Code from the cog_c_toggle demo:
Thanks for your help.
Code from the cog_c_toggle demo:
/* * function to start up a new cog running the toggle * code (which we've placed in the toggle_fw.cog section) */ void start(volatile void *parptr) { extern unsigned int _load_start_toggle_fw_cog[]; #if defined(__PROPELLER_XMM__) || defined(__PROPELLER_XMMC__) load_cog_driver_xmm(_load_start_toggle_fw_cog, 496, (uint32_t *)parptr); #else cognew(_load_start_toggle_fw_cog, parptr); #endif }
Comments
or
https://code.google.com/p/propgcc/source/browse/lib/drivers/drivers.c?name=release_1_0
I would really appreciate it if someone would try and run the cog_c_toggle demo and confirm that it works using XMMC.
Thanks --markM
cog_c_toggle seems to work OK for me in XMMC mode. Did you remove all the old files before building in XMMC mode? I know that make doesn't know that it has to do that when switching modes; I'm not sure about simpleide, but it may have the same problem.
Eric
Thanks for trying it. That confirms that it is me. I am uisng SimpileIDE. I tried removing all the old files, but it still displays: "hello,world!" , "toggle cog has started" and then hangs. It never toggles the led or displays the toggle count messages. I'll keep messing with it.
Thanks for your help.
SimpleIDE uses separate folders for output and always rebuilds except for libraries.
I suggest for building the latest default update using ./jbuild.sh 6 rm-all (or for windows ./rebuild.sh rm-all).
This ensures that all gcc libraries (and everything else) is updated in your build. If you are using windows, it can take a very long time to build.
This bug is also in release_1_0 and work is in progress for that.
CMM and LMM work fine, but XMMC does not. For example with Quickstart + EEPROM XMMC the loader started and reset the board immediately (this is really bad!). Also, I noticed this in all loads and am not sure what it means: "No value for __cfg_basepin in the configuration fileLoading the serial helper to hub memory"
Sorry for the trouble. Please be patient while we work this out.
I must not understand the problem you're reporting. I just tried the cog_c_toggle demo on the C3 using both the C3 cache driver and the EEPROM cache driver and both seem to work. Here is the output:
C3 cache driver:
EEPROM cache driver:
What isn't obvious from these transcripts is that the LED was toggling in both cases.
What am I missing here? I don't have a QuickStart board with me on my trip so I can't try that until Friday.
Edit: Is there any chance you were using the "kernel-work" branch? The EEPROM driver won't work in that branch because I haven't converted it yet to the new cache driver architecture.
Edit 2: FORGET THIS MESSAGE FOR NOW!! Sorry for the irrelevant information. I just realized that by default the cog_c_toggle demo builds in LMM mode so of course it worked fine with both the C3 and the EEPROM board configuration files. No external memory was being used. I'll try this again with XMMC mode but I can't do it right now because I'm in the middle of building the release_1_0 branch. Stay tuned.
Okay, I built the default branch again and tried cog_c_toggle in xmmc mode with both the c3 and the eeprom cache drivers and it works for me in both cases. As I said before, I must be missing something about the problem that is being reported here. By the way, this is using propgcc/demos/toggle/cog_c_toggle.
Now I don't even see a .cogc file
There is no need to use the .cogc extension to build COG drivers. This is just a convention used by SimpleIDE and some of the other demos. All that is necessary is to use -mcog on the command line. The Makefile for the demos/toggle/cog_c_toggle demo has a rule for building toggle_fw.c using the -mcog compiler option.
I created a simpleIDE project and copied the files into it. When I compile the project it fails with a undefined reference (see below). What else should I have done?
Thank you for your help.
--markM
Yes – this is where I started. It compiles clean (using xmmc), but it displays “hello,world!”, “toggle cog has started” then hangs. It never starts flashing the led or displays the toggle count. I’ll reinstall simpleIDE and try again.
What board type are you using?
The demo will only work with EEPROM XMMC. This is not clear from the comments - sorry about that.
I am using a C3. I was trying to run from flash. When I switch it over to EEPROM it now works.
Thanks for your help.
--markM
If you are still monitoring this thread would you explain why the the demo (when compiled for xmmc) doesn't work using SimpleIDE using a board type C3F, but does work using EEPROM XMMC?
I have switched over to building from the command line to keep moving on my project. That is working fine, but I would like to go back to using SimpleIDE if I could.
Sorry to be so dense. Thanks
What I meant was it does work correctly after I changed the pin being toggled to just 15.