Author Topic: C: freedom from PICs  (Read 1411 times)

0 Members and 1 Guest are viewing this topic.

Online NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2043
  • Country: gb
Re: C: freedom from PICs
« Reply #25 on: May 21, 2020, 10:31:10 am »
You're lucky :D -nostdlib is par for the course
Actually I meant writing serial bytes... I used 'printf' as a generic term rather than a function call.  ;)
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 1517
  • Country: us
  • Formerly SiFive, Samsung R&D
Re: C: freedom from PICs
« Reply #26 on: May 21, 2020, 11:54:11 pm »
on the target it tends to be printf and pin wiggling.

You're lucky :D -nostdlib is par for the course when I have to do it so everything has to be from scratch. Granted, setting up a rudimentary printf is quite easy. Just send the string byte-for-byte until a 0 is encountered :)

Well ... that's puts() rather than printf(). A printf() that can handle %s and %d without field widths or number bases is about a dozen lines of code. Adding hex and octal and minimum widths with space or zero padding (99% of what people use) it's probably 50 to 100 lines of code.
 

Offline chriva

  • Regular Contributor
  • *
  • Posts: 102
  • Country: se
Re: C: freedom from PICs
« Reply #27 on: May 22, 2020, 12:07:43 am »
You could even call the function printfart() if you wanted :p

On a more serious note tho: You are indeed correct.
I tend to use the term as an umbrella for all of them for some stupid reason. -sorry :)
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 3193
  • Country: us
Re: C: freedom from PICs
« Reply #28 on: May 22, 2020, 02:40:17 am »
Quote
I had totally forgotten about that horror
Mingw is a horror?  I recall it being relatively trivial to install.  I was just using the CLI tools; presumably that would be sufficient for "learning the basics of C"
(or, there is apparently VS Code support for mingw:  https://code.visualstudio.com/docs/cpp/config-mingw ) (although my very limited experience with VS Code seems to indicate that it's harder to set up than a CLI based build/compile/debug system...   Perhaps not ideal for short and sweet C training programs...)

Quote
I never use a debugger. Not on the desktop, not in embedded.
And... Are you just learning a new language?
« Last Edit: May 22, 2020, 02:50:18 am by westfw »
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 3193
  • Country: us
Re: C: freedom from PICs
« Reply #29 on: May 22, 2020, 05:55:47 am »
oh, If you sort-of think that MPLABX is OK aside from the upload/reprogram/etc cycle, you might want to try installing Netbeans with mingw for "local" compilation.  MPLABX is built on top of NetBeans, and they might be similar (depending on how much customization Microchip has done.)https://netbeans.org/community/releases/80/cpp-setup-instructions.html#compilers_windows
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 2440
  • Country: gb
Re: C: freedom from PICs
« Reply #30 on: May 23, 2020, 01:30:17 pm »
I have Code::Blocks installed on all the machines I develop on, it will install GCC for you (if you download the full package) and it has a pretty decent IDE.  I use it for developing and unit testing algorithms/numerical functions and for knocking up small utilities for creating/reading files etc.
 
The following users thanked this post: NivagSwerdna

Offline chriva

  • Regular Contributor
  • *
  • Posts: 102
  • Country: se
Re: C: freedom from PICs
« Reply #31 on: May 23, 2020, 01:45:15 pm »
Had no clue they were still around
If they're anything like they used to I can definitely vouch for this suggestion :)
 

Online Jan Audio

  • Frequent Contributor
  • **
  • Posts: 446
  • Country: nl
Re: C: freedom from PICs
« Reply #32 on: June 27, 2020, 02:58:19 pm »
Go for programming DOS.
It is console window, very easy.
Just about as simple as programming a PIC.

C++ is also good, just dont use classes.
For the rest you can learn, it is about the same.
« Last Edit: June 27, 2020, 02:59:50 pm by Jan Audio »
 

Offline pidcon

  • Contributor
  • Posts: 9
  • Country: my
Re: C: freedom from PICs
« Reply #33 on: June 28, 2020, 10:39:19 am »
There are online C compilers which you could try out. It's based on either gcc or clang.

https://www.onlinegdb.com/
https://repl.it/languages/C
https://www.jdoodle.com/c-online-compiler/

Otherwise, if the compiler has to be in the local Windows computer, I would suggest the C/C++ compiler from Embarcadero. It was used to be Borland's C/C++ compiler. No installation required, just set the user PATH and you're good to go. There are some features in the old compiler which is no longer necessary in the modern compilers.

https://www.embarcadero.com/free-tools/ccompiler

All the best!
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2101
  • Country: 00
Re: C: freedom from PICs
« Reply #34 on: June 29, 2020, 01:18:19 pm »
 

Online garethw

  • Regular Contributor
  • *
  • Posts: 67
  • Country: gb
Re: C: freedom from PICs
« Reply #35 on: June 30, 2020, 10:12:27 pm »
Linux user here, so GCC, make, and the like. I use VSCode as my editor.
Father
Husband
MENG Electronic Engineering student
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1455
  • Country: dk
Re: C: freedom from PICs
« Reply #36 on: Yesterday at 05:10:36 pm »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf