-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Freeing grbl_stm32 from eclipse #16
Comments
I'm surprised that you have problems with eclipse, I've never had any real problems with AC6 or CUBEIDE, anyway |
Thanks, I use the distro installer, I don't know whether that clearing configs for some reason. Anyway each time I update I loose the a6 workbench and when I reinstall that, agree to the EULA again, it's lost its setting too. I can now build the project on eclipse but I can't flash or run it. It's failing to get a lock file because it still attempting to write to /var/lock ( that went out of fashion a while ago because of an exploit ). There's no error in the UI but that maybe just failing silently. A lot of the problem is eclipse tries to do everything plus the kitchen sink and it's painfully complex to find whatever you need to set anything up. I'd like to get to a makefile based system. I've looked at makefile structure in Debug but that does not work from the command line. It seems to be mapping cos and sin calls differently when run from CLI.
It's also quite a complex iterative build system created , presumably, in java code. That means I still have a dependency on eclipse. When I was working with avr grbl, I had a nice simple set up using Geany and Makefile. I need to get back to something like that. Fortunately I still have the dev system attached to the machine which I don't update (for exactly this reason). It's just not practical for making mods and testing code. |
I might have a look at it later, I have another STM project that builds with a makefile sure the error isn't related to the TTY being owned by root or you not in the dialup group? |
yes, user is in lock and dialout
I tried changing /var/lock -> /run/lock to be writeable by the user. No change. Probably a false lead. If you have a sample makefile that certainly could be useful. Thanks. |
what is the permissions on the TTY? |
I just tried importing the project in Cubeide(because that is what I have installed on this pc) and with the compiler added to the path it builds with make on the command line, just can't use make clean because it deletes everything |
what is the permissions on the TTY? ls -ail /dev/ttyACM0 |
you must be doing something weird :) I've never had any problem installing AC6( or Cube I believe that is the official tool from STM now) import the project and build. can you try that ? btw. why tty for flashing? |
I just wondered whether the WB was trying to set a lock file and then abandonning communication with the card, if it failed. Sure the flash process does not use the pseudo comm port device ( which is a USB device on the same bit of wire ). Did you see my previous post ? IIRC ST stopped paying a6 for this WB a couple of years ago. They may simply have stopped supporting these dev boards now. That's another reason I don't like depending upon proprietory s/w with some opaque installation procedure, which needs reinstalling every 3mo or so. I had to update Eclipse because of a distro upgrade, now my development system has evaporated ! |
did you install eclipse or AC6? I'd switch to cubeide. Imported the project into cubeide and it doesn't have any settings for target board, I not even sure it does anything in AC6 other than preset some things when you first make the project |
seems like the AC6 installation is screwed up, I've always installed AC6 (or cubeide) and not eclipse. |
in AC6; import,general,"existing projects into workspace" |
Ah, right it's just to import one eclipse project into another eclipse installation. I did manage to import the eclipse + a6 version ( which does compile but has no run/debug ) into cubeIDE but now that fails to compile with the csinl errors again. I'm not sure what is causing the problem with these built-in functions. It appeared and went on the original installation , now it's back here on ice. It's about 4 days I've wasted on this garbage and it's still not running anywhere. I started looking into using autotools but that whole other rabbit hole to fall down. |
the errors seems to me like you have something screwed up with which compiler it uses what OS are you on? |
I'm using Fedora. The IDEs show: I did an import but that is one thing which does not seem to have been preserved. I did have the distro cross toolchain and newlib installed but I've removed that to avoid possible confusion. I added -fno-builtin to the GCC compiler "miscellaneous" flags in cubeIDE, but it seems to be ignored. equally setting -fno-builtin-sin -fno-builtin-cos seems ignored. |
your PC must be haunted, it makes no sense that it doesn't just work. I just tried cloning the repo, import into cube, build, debug, everything works. Do you really want to go back to geany and a makefile? it'll be like going back to the 80's, no debugger, no smart editor, etc. |
In the 80's I was working with Borland's Turbo Pacal IDE. Still the fastest and best IDE I've ever used. ;) I long for those days. Geany is syntax aware that's smart enough for me. I find it clearer to look at code with that than eclipse. I did successfully run the "Scope" debugger plugin on Geany via gdb doing remote debugging on these boards and it was at least ten times quicker than Eclipse when stepping through code. ( IMO the IDE spends 99.8% of its time updating every panel in the "perspective" and 0.02% of its time debugging ). Sadly Scope debugger has not been updated to py3, but at this stage, it's looking like fixing that could be less work than fixing the current mess with eclipse. Why do I get the csinl problems and why don't the compiler flags work? I get no feedback, no errors yet the compiler output does not change. It maybe just some minor config is still missing but with the size of a IDE like there a metric haystack of chaff to crawl through to find the config needle. cubeIDE looks like it might be close to working apart from that _builtin trig function stuff. This is why I hate free, closed source proprietory GUIs for this sort of stuff, when it works it's fine and when it doesn't you're stuffed. There is no support at a6, I gave up on that idea about 4y ago. Makefile is a pain to set up on a complex structure like this but at least you get to write the rules and you can see and test what it going on. It's a documented procedure you just have to put in the work. GUI's often just silently swallow the error and leave you blind. Thanks for all your suggestions, I don't know where I go from here. |
the only thing I can think of it the you have a screwed up path so that i doesn't use the right compiler I'll try to setup a makefile |
Ah thanks, that would be brilliant. |
I've added a makefile, it builds and the board boots with the usual boot message but it has not been tested on cnc hw and I have not checked that all the settings are identical so use at your own risk |
Many thanks, that's a great help. At last ! st-flash did its job and verified data. Jolly good ! I can now make and flash from Geany :) The compiler calls itself: I think I read it's the Lacarno build. I'll dig it out and put a copy in a safe place. I now have something close to a working development system again. So I need to look into the current state of the Geany debugging plug-in "scope" and see whether I can still configure it to connect to do remote debugging. Many thanks for your patient assistance. |
you are welcome, it was a chance to brush up on makefiles. Be aware that st-flash is "broken", it erases the flash sector used to simulate eeprom. So you will be back to default settings every time you flash |
Thanks for the warning. Isn't that what happens when flashing via the IDE as well? I've actually modified the grbl defaults to those suited to the machine so it's not a big issue. If I change speeds etc while working it goes back to my working defaults rather than something I don't want. I may open a bug about this at fedora since it seems to ignore the compiler options and also tries to substitute a function which is not even defined. What is the gcc -v info from the Ubuntu version? If that works they may have a patch. |
1 similar comment
Thanks for the warning. Isn't that what happens when flashing via the IDE as well? I've actually modified the grbl defaults to those suited to the machine so it's not a big issue. If I change speeds etc while working it goes back to my working defaults rather than something I don't want. I may open a bug about this at fedora since it seems to ignore the compiler options and also tries to substitute a function which is not even defined. What is the gcc -v info from the Ubuntu version? If that works they may have a patch. |
The IDE doesn't erase sector the is used to simulate EEPROM because it isn't used for code, st-flash should do the same when programming an ihex file but it doesn't The compiler installed with apt-get: gcc version 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] (15:9-2019-q4-0ubuntu1) both work |
It looks like Cube and a6 use exactly the same compiler version. That makes sense. Unless I have reason to change, that's probably a good enough choice. I suppose I could always unpack the deb file if I need gcc version 9.2.1 20191025 . The buggy Fedora cross-gcc is : gcc version 10.2.0 (Fedora 10.2.0-4.fc34). That's the deal with Fedora we get to be lab rats for Redhat :D |
the IDEs use stlink gdb, not stflash |
I just tried gcc 10.2.1 and with a -fcommon to fix a change in defaults it works |
Thanks. I added that option to your Makefile and let it default to the distro cross compiler by not defining GCC_PATH
Is that what you meant? I'm still getting the built-in function errors. BTW I was mistaken in thinking -fno-builtin and -fno-builtin-sin should affect this.
However, the fact that those built-ins are not defined does seem to be a drawback ;)
|
Could you confirm I'm reading this correctly? Irrespective of the right compiler switch to prevent the built-ins being used, it seems that they are not even defined. It seems the compiler is mapping sin() to '__builtin_tgmath' with the sixth arg of csinl . ( I'm guessing that means c compiler's longint sine substitute ). However this variable which should point to the built-in version of sin() is not actually defined in the cross-compiler. That looks like a compiler bug. Though I don't find any trace of similar output in searches. |
Hi again, I hope you are doing well.
Are you able to suggest a way to free this project from using eclipse ?
Every time I update the eclipse package I waste at least a day trying to get back to the stage where I can even load this project. It's a mess. I need to reinstall the a6 workbench and then it always seems to loose all track of the project and I'm left slashing around in the totally confused interface trying get it to open something which was fine before I updated.
This time I'm lost. I've spend a day screwing around and I can't get it find the project file. I have no idea what is wrong and there is not intelligible output. It's just empty.
I really need a way to build the project outside of eclipse and never hear that name again.
Do you have any suggestions on how I can go about that?
Many thanks for any ideas, I really have to find another way of working.
The text was updated successfully, but these errors were encountered: