This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Does anyone have any advice for learning how to program Cortex-M processors without an IDE?

I'm interested in learning about what's under the hood, or what's hidden from you by an IDE, by which I mean, compiler, linker, makefiles - that type of thing. I have a few specific, if potentially misguided questions about what I think I should be doing with it so far, but am also very open to general advice about this kind of thing.

The reason this is important to me now, after doing various microcontroller things in university, which were only taught using IDES, is I'm trying to learn a unit testing framework.

Specifically, this framework is Unity, and from what I understand so far, you can't just survive under the protection of IDES any more if you want to use it.

For example it seems, for each 'module' you want to test (eg module.c and module.h) you should create a testModule.c which has a separate main() containing file of its own to run the tests (I believe this would be the 'test runner'. The problem for me here is if I did this in Keil uvision, it would rightfully get upset because you can't have more than one main(). So therefore I need to tell the linker to either compile the module with 'proper' main() or the test one. I don't know how to do that though.

I would also probably then be interested in running my test executable on the native environment rather than the target (which I think means running it on the pc on which I wrote the firmware rather than downloading code to a microcontroller and hitting go or debug in the ide).

This is a problem I don't know how to invoke my pcs' c compiler (cl.exe) compiler to build anything than a simple helloWorld.c type program with no dependencies on header files outside of the local directory.

Advice general or specific in making headway in this area will be welcomed.

The microcontroller I have is stm32F4 on a discovery board, so cortex m4. I use keil uvision and windows 7 to program