User forums > Embedded development
How to generate asm files from c program ?
halfboy:
Hello everyone !
I've been searching for solution but everything I tried - failed.
I've started programming Atmel's microcontrollers in C, but I'd also like to generate assembly code during compiling, as I'd like also to learn how compiler generates instructions for my microcontroller (I think it will be effective way to learn assembler too).
Could someone help me what should I do, maybe install extra plugins ?
I'm using Ubuntu 14.04.1 LTS
Greets !
Alpha:
--- Quote from: halfboy on February 07, 2015, 08:29:29 pm ---I'm using Ubuntu 14.04.1 LTS
--- End quote ---
Makes me assume you are using GCC. Assuming that is the case, you are probably looking for the -S command flag. Use man pages/google/trial and error to figure out how GCC needs it specified (learning how to find information is an essential part of programming; it gets easier once you have some knowledge of what you are searching for).
You can technically hack the templates within advanced compiler options to make C::B generate this output, but in this situation, it would probably just be more efficient to execute that command line.
halfboy:
Thanks for help.
Yes, of course I'm still learning but I always ask google for help before write at forum. But I have big problems with that topic as I think I've tried many many solutions and nothing helped. I tried change in C::B compilator for GNU AVR GCC Compiler but nothing happen. Moreover I've tried to add -S flag in advanced compiler options but still nothing helped.
But I will still searching, hope to find solution...
P.S. Hope my english is understandeable
stahta01:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
Did you try -S in other compiler options?
Tab: Compiler Settings
Sub-Tab: Other Options
Tim S.
halfboy:
I tried to add -S flag in advanced compiler options.
what exactlu should I write in 'other options' as there is a text box ?
greets
Navigation
[0] Message Index
[#] Next page
Go to full version