Help Creating a Stubless Win32 newlib Port
Thu Nov 1 11:54:00 GMT 2012
I would like to know if someone would be willing to advise me on to create a stubless win32 port of newlib that can be compiled using mingw (actually mingw-w64) and staticly linked into a native win32 executable.
I'm currently developing an STM32F4 based application, but the program-compile-download-debug cycle is killing me. To get around this I've developed a part of my application on a Windows PC by emulating some of the hardware and then, after the vast majority of my logic was worked out, I just copied the code to my STM32F4 project. It turned out to be much more productive than developing straight to the board. I'm currently using Eclipse and Sourcery Codebench Lite for the STM32F4 and mingw-w64 for the win32 stuff.
I want to do the rest of my development this way, but because my STM32F4 application is being linked to newlib's libc, and my syscall stubs do some very hardware specific things, I need to create a native win32 port of newlib.
I don’t need a win32 port that implements all of the newlib syscalls. Rather I intend to implement my own syscalls in win32 to emulate my STM32F4 hardware. Reading the newlib FAQ and looking through the source code, it looks like some of the necessary features are already implemented in the i386 and other similar ports, but I am a little naïve on this.
I hope I’ve been articulate enough for you to get the idea. I think this may be of value to other embedded developers, but if you think I’m going about this the wrong way, I welcome any constructive advice.
Since I'm not familiar with the structure of newlib, if someone’s willing to give me some specific guidance on how to go about this (maybe a todo list), I’ll do my best to make it happen and return my work back to the community.
More information about the Newlib