2010-01-11 10:09 AM
STM32F103 and WiFi chip
2011-05-17 04:36 AM
The TCP/IP Protocol, if that's target dependant, then I won't be able to port that with ease?
[ This message was edited by: tkjmail on 11-01-2010 09:42 ]2011-05-17 04:36 AM
''Target independent'' means that it does not depend upon any specific target; ie, it is portable
2011-05-17 04:36 AM
Sorry, missed the ''in-'' 😉
2011-05-17 04:36 AM
The key to writing Portable code is to never use any feature that relies upon any specific tools, environment, or target hardware.
In practice, of course, this is impossible. In practice, you need to make sure that you make no direct use of any specific tool, environment, or target hardware features. Instead, you must ''encapsulate'' all dependencies in easily isolated forms. A prime example of this is the way that the ST Firmware Library never uses the standard 'C' int, char, or other types; instead, it defines u8, s16, etc - thus it is not dependent on how a particular compiler implements the standard 'C' types. Similarly, rather than coding reliance on any chip-specific features directly into all your code, you should provide generic ''drivers'' - so that only the ''drivers'' need to be changed to port the code to another chip. eg, instead of accessing the SPI peripheral registers directly, provide generic functions like spi_write, spi_read, etc - then only the implementations of those functions need to be changed for a different chip! Thus you would have an AVR-specific spi_read, spi_write etc for your AVR, and an STM32-specific spi_read, spi_write etc for your STM32 - and all the other code should just port unchanged! If you haven't already written your AVR code in this portable manner - ie the whole code is full of dependencies on the AVR chip and the specific compiler, etc - then I suggest that you start by re-writing the AVR code to be portable. Once you have portable code running on your AVR, it will be a lot easier to port it to the STM32.2011-05-17 04:36 AM
Just seen this:
Quote:
Microchip Technology Acquires ZeroG Wireless
Deal Enables Embedded Wi-Fi® Solutions for PIC® Microcontrollers CHANDLER, Ariz.--(BUSINESS WIRE)--Microchip Technology Inc. (NASDAQ: MCHP), a leading provider of microcontroller and analog semiconductors, today announced it has acquired ZeroG Wireless, Inc. (http://www.microchip.com/get/9B6V), an innovator in low-power embedded Wi-Fi® solutions based in Sunnyvale, Calif. ZeroG is a privately held fabless semiconductor developer of Wi-Fi-certified transceivers and FCC-certified modules, which further strengthen Microchip’s wireless offerings by enabling embedded designers to easily connect to this ubiquitous networking protocol with any 8-, 16- or 32-bit PIC® microcontroller. The terms of the deal are confidential.http://www.businesswire.com/news/home/20100111005457/en/Microchip-Technology-Acquires-ZeroG-Wireless
2011-05-17 04:36 AM
Thanks... I'll check that out - that should be possible to convert to some usable code for the STM32 (Ride7 IDE)