PASM (.S files) in SimpleIDE
kitsune
Posts: 22
Hi,
before I make a blatant fool of myself (see below), let me briefly say "hello" since this is my first posting here. I grew up with 6502 assembly language, worked on minicomputers (FORTRAN and assembly) in the early 80s, held a completely different job for many years before I took up microcontroller programming (mostly Atmel AVR) once again in the 1990s. Ubuntu is my primary OS, but I do run XP in a VM (cannot run SimpleIDE under Ubuntu Lucid [Qt compatibility issue -- I have Qt 4.7 installed and SimpleIDE wants >4.7], but that is an entirely different issue...). Anyway, SimpleIDE does work well in the VM. I am not familiar with makefiles and kind of spoiled from Atmel Studio automatically generating makefiles.
Now here is the trouble: Trying to familiarize myself with PASM files under SimpleIDE, I created the following one-liner and stored it as "cog.S":
The other file ("hello.c") is a basic "main" in C. When I build the project, I get the following error message which I cannot interpret:
gcc does process the *.S file creating an appropriate *.asm file.
Any chance somebody could explain to me what I need to do to make SImpleIDE build a project that includes *.S files? The material in http://forums.parallax.com/showthread.php/142441-Native-assembly-files-(*.S)-in-propgcc?highlight=.s+files is great, but all the makefile stuff is way over my head.
I'd appreciate your assistance.
Kind regards,
Fred
before I make a blatant fool of myself (see below), let me briefly say "hello" since this is my first posting here. I grew up with 6502 assembly language, worked on minicomputers (FORTRAN and assembly) in the early 80s, held a completely different job for many years before I took up microcontroller programming (mostly Atmel AVR) once again in the 1990s. Ubuntu is my primary OS, but I do run XP in a VM (cannot run SimpleIDE under Ubuntu Lucid [Qt compatibility issue -- I have Qt 4.7 installed and SimpleIDE wants >4.7], but that is an entirely different issue...). Anyway, SimpleIDE does work well in the VM. I am not familiar with makefiles and kind of spoiled from Atmel Studio automatically generating makefiles.
Now here is the trouble: Trying to familiarize myself with PASM files under SimpleIDE, I created the following one-liner and stored it as "cog.S":
.section .cog .cog_ram entry jmp #entry
The other file ("hello.c") is a basic "main" in C. When I build the project, I get the following error message which I cannot interpret:
gcc does process the *.S file creating an appropriate *.asm file.
Any chance somebody could explain to me what I need to do to make SImpleIDE build a project that includes *.S files? The material in http://forums.parallax.com/showthread.php/142441-Native-assembly-files-(*.S)-in-propgcc?highlight=.s+files is great, but all the makefile stuff is way over my head.
I'd appreciate your assistance.
Kind regards,
Fred
Comments
There is a thread in the sub-forum "Propeller GCC Beta" with a very similar title to this one that might help. While you may not be familiar with Makefiles, there is an example one there that you can modify very minimally to get you started, and I would recommend using one if you want to include native assembly drivers. It's not absolutely necessary, but it makes things a lot easier, since there are a few steps and a few gotchas in the process.
David
Maybe now's the time !
As I said, working with the Propeller is great fun, but I keep struggling with the IDEs. "Propeller Tool" is the only IDE I am sort of happy with as far as the actual IDE is concerned. Since I am not that fond of SPIN and would like to be able to use "luxuries" such as header files and "#define" etc. in my assembly code (and possibly some compiled C code), I am looking into alternatives. A nicer editor would also be good to have...
Maybe I should feel guilty that I limit myself to writing Propeller code, expecting a functioning IDE. I am definitely aware that most of the development is done by the community. PC programming, IDEs and stuff are matters I am not particularly good at. Therefore, I would like to be able to concentrate on what I do best.
Oh well, if I want to use the luxuries provided by the preprocessor, I will have to learn about makefiles.
It will be in the April Beta release. I don't have any 0-8-5 maintenance plan at this time mainly because I'm so busy with the Parallax Education update.
My tutorial would include how to write *.S and cogc drivers for propGCC, modify a boilerplate Makefile, pass and use parameters from the main program to the driver (via a mailbox), and put all this together in an extendable and maintainable way. I understand that there are demos (toggle, in particular) that go pretty far in this, but people still seem to have a lot of questions and problems (as I did myself), so it seems like there's a need. If others would like to add a section on how to integrate this into their IDE of choice, that would be fine.
Considering the above, Yea or nay ?
Mailbox/communication between cogs and hub etc. is not my real problem, I am much more troubled by the issue of integrating all this into the IDE.
May I ask which editor you are using (as I mentioned, despite having started with "vi" type editors a long time ago, I am now mostly used to Atmel Studio, which is based on MS Visual)?
To me, a propeller load function (+ terminal) would be mandatory...
SimpleIDE (and most casual users) don't use make, but many professional software engineers certainly do.
Any tutorials that show people how to use familiar tools like Make, GCC, and friends in the Propeller context are most welcome.
Enough chit-chat, the next post I will put in this thread will include a draft of the tutorial, hopefully by tomorrow (I'll have some time tonight).
Make is beautiful in many ways (except the requirement for hard tabs and a few other items).
I'm certainly not interested in any kind of war of tools - I use make and vim all the time (and emacs sometimes).
Maybe make just need some image "make-over" marketing.
I look forward to your post.
Thanks,
Frank