<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Gcc on Carmine Noviello</title><link>https://www.carminenoviello.com/tags/gcc/</link><description>Recent content in Gcc on Carmine Noviello</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Wed, 23 Nov 2022 12:25:42 +0000</lastBuildDate><atom:link href="https://www.carminenoviello.com/tags/gcc/index.xml" rel="self" type="application/rss+xml"/><item><title>How to precisely measure microseconds with STM32</title><link>https://www.carminenoviello.com/2015/09/04/precisely-measure-microseconds-stm32/</link><pubDate>Fri, 04 Sep 2015 09:41:12 +0000</pubDate><guid>https://www.carminenoviello.com/2015/09/04/precisely-measure-microseconds-stm32/</guid><description>&lt;p&gt;I received this apparently simply question from a reader of this blog: how can I delay a fistful of microseconds in STM32? That is, how to measure microseconds precisely in STM32?&lt;/p&gt;&#10;&lt;p&gt;The answer is: there are several ways to do this, but some methods are more accurate and other ones are more versatile among different MCUs and clock configuration.&lt;/p&gt;&#10;&lt;p&gt;Let&amp;rsquo;s consider one member of the STM32F4 family: STM32F401RE, the MCU that equips the STM32Nucleo-F401RE board. This micro is able to run up to 84Mhz using internal RC clock. This means that ever 1µs, the clock cycles 84 times. So, we need a way to count 84 clock cycles to assert that 1µs is elapsed (I&amp;rsquo;m assuming that you can tolerate the internal RC clock 1% accuracy).&lt;/p&gt;</description></item><item><title>Getting started with STM32F746G-DISCO</title><link>https://www.carminenoviello.com/2015/07/13/started-stm32f746g-disco/</link><pubDate>Mon, 13 Jul 2015 05:06:56 +0000</pubDate><guid>https://www.carminenoviello.com/2015/07/13/started-stm32f746g-disco/</guid><description>&lt;p&gt;ST Microelectronics recently expanded its portfolio of STM32 microcontrollers with the new STM32F7 family. These are the new best-in-class MCUs from ST, with a Cortex-M7 core able to run up to 216Mhz (future releases will run up to 400Mhz with 2000 CoreMark index), with an internal flash up to 1Mb and 360Kb of RAM. STM32F7 is also able to run from external flash memory without performance penalty, thanks to a L1 cache (this is probably the most interesting aspect of these MCUs). STM32F7 are targeted for High-end embedded applications, especially to multimedia ones, and I think that it&amp;rsquo;s far from low-budget applications and hobbyist uses. At the time of writing, these MCUs are quite pricy, ranging from 12€ to 20€/pcs for low-volume orders. This is definitely a really high price, especially if you consider that &lt;a href="https://www.olimex.com/Products/Components/IC/A20/"&gt;you can find around&lt;/a&gt; Cortex-A7 MCUs for less than 10€. But I think that the price will be dramatically reduced in the future.&lt;/p&gt;</description></item><item><title>Running FreeRTOS on a STM32Nucleo using a free GCC/Eclipse toolchain</title><link>https://www.carminenoviello.com/2015/06/22/running-freertos-stm32nucleo-free-gcceclipse-toolchain/</link><pubDate>Mon, 22 Jun 2015 05:50:14 +0000</pubDate><guid>https://www.carminenoviello.com/2015/06/22/running-freertos-stm32nucleo-free-gcceclipse-toolchain/</guid><description>&lt;p&gt;Using a micro like the STM32F4, able to run up to 160Mhz, with 512Kb of flash and about 100k of RAM, without using an operating system is a nonsense. Although it&amp;rsquo;s perfectly possible to use some forms of cooperative scheduling to execute firmware activities, basically this not convenient especially when dealing with low level events related to hardware (eg. interrupt handling) and aspects related to synchronization. As long as your firmware starts to grow, you&amp;rsquo;ll need constructs to synchronize firmware activities, like queues or semaphores. Moreover, especially when dealing with low-power devices, a busy spin (while(some condition);) it&amp;rsquo;s not the best solution if you have to fight with mAh.&lt;/p&gt;</description></item><item><title>Build STM32 applications with Eclipse, GCC and STM32Cube</title><link>https://www.carminenoviello.com/2015/06/04/stm32-applications-eclipse-gcc-stcube/</link><pubDate>Thu, 04 Jun 2015 14:13:18 +0000</pubDate><guid>https://www.carminenoviello.com/2015/06/04/stm32-applications-eclipse-gcc-stcube/</guid><description>&lt;aside class="callout callout--info" role="note" aria-label="Note"&gt;&#10; &lt;p class="callout__title"&gt;Note&lt;/p&gt;&#10; &lt;div class="callout__content"&gt;&lt;p&gt;&lt;strong&gt;Please, read carefully.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;Thanks to the feedbacks I have received, I reached to the conclusion that it&amp;rsquo;s really hard to cover a topic like this one in the room of a blog post. So, I started writing a book about the STM32 platform. In the free book sample you can find the whole complete procedure better explained. You can download it &lt;a href="https://leanpub.com/mastering-stm32"&gt;from here&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/aside&gt;&#10;&#10;&lt;p&gt;If you landed to this page, you probably already know that I&amp;rsquo;ve covered this topic in the past. &lt;a href="https://www.carminenoviello.com/?p=998"&gt;I showed in a series made of three posts&lt;/a&gt; how to successfully setup a complete Eclipse/GCC ARM tool-chain to develop applications for the STM32Nucleo-F4 developing board. Since then, many people have reported me positive feedback on that tutorial. But, some of them had serious troubles in getting those instructions working for other STM32 families (F0, F1 and so on). This was mainly caused by the &lt;a href="http://gnuarmeclipse.livius.net/blog/"&gt;GNU ARM Eclipse plug-in&lt;/a&gt;, or rather by the included templates in the plug-in.  When a new project is created using the plug-in wizard, a template is used depending on processor family. Unfortunately, the plug-in author has updated just the template for STM32-F4 family to the more recently STM32Cube-F4 HAL framework from ST (which still supports only commercial IDE&amp;hellip;..), leaving the other templates still based on the old Standard Peripheral Library, which is no longer supported by ST and STM32CubeMX tool used in my tutorial. *This causes my instructions to be wrong for processor families different from STM32-F4. *&lt;/p&gt;</description></item><item><title>BlueNRG shield for STM32 Nucleo</title><link>https://www.carminenoviello.com/2015/03/08/bluenrg-shield-stm32-nucleo/</link><pubDate>Sun, 08 Mar 2015 15:32:51 +0000</pubDate><guid>https://www.carminenoviello.com/2015/03/08/bluenrg-shield-stm32-nucleo/</guid><description>&lt;p&gt;I recently received during a ST training day a sample of the X-NUCLEO-IDB04A1 shield. This shield is based on the BlueNRG network processor from ST and it allows to create Bluetooth Low Energy (BLE) applications using an Arduino compatible developing board. Obviously, ST designed the software for this shield to be used mainly with its Nucleo range of developing boards. In fact, all necessary libraries and examples needed to use this shield are designed to run on Nucleo-L0 and Nucleo-F4 boards using their respective HAL. However, ST still doesn&amp;rsquo;t provide official support to free GCC/Eclipse toolchains (an this is a pity&amp;hellip;), and it&amp;rsquo;s a little bit tricky to use ST demo files and BlueNRG HAL without using a commercial IDE supported by ST (IAR, TrueSTUDIO, etc).&lt;/p&gt;</description></item><item><title>Setting up a GCC/Eclipse toolchain for STM32Nucleo – Part III</title><link>https://www.carminenoviello.com/2015/01/16/setting-gcceclipse-toolchain-stm32nucleo-part-iii/</link><pubDate>Fri, 16 Jan 2015 07:12:39 +0000</pubDate><guid>https://www.carminenoviello.com/2015/01/16/setting-gcceclipse-toolchain-stm32nucleo-part-iii/</guid><description>&lt;aside class="callout callout--info" role="note" aria-label="Note"&gt;&#10; &lt;p class="callout__title"&gt;Note&lt;/p&gt;&#10; &lt;div class="callout__content"&gt;&lt;p&gt;&lt;strong&gt;Please, read carefully.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;Thanks to the feedbacks I have received, I reached to the conclusion that it&amp;rsquo;s really hard to cover a topic like this one in the room of a blog post. So, I started writing a book about the STM32 platform. In the free book sample you can find the whole complete procedure better explained. You can download it &lt;a href="https://leanpub.com/mastering-stm32"&gt;from here&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/aside&gt;&#10;&#10;&lt;p&gt;Let&amp;rsquo;s recap what we&amp;rsquo;ve done in the two previous parts of this series. In the &lt;a href="https://www.carminenoviello.com/?p=998" title="Setting up a GCC/Eclipse toolchain for STM32Nucleo – Part I"&gt;first part&lt;/a&gt; we&amp;rsquo;ve configured Eclipse and GCC to build applications for the ARM-Cortex platform. We&amp;rsquo;ve used the GNU ARM Eclipse plug-ins to generate a minimal yet working example (a simple blinking LED app) for our STM32 Nucleo board. Next, we&amp;rsquo;ve used the CubeMX tool from ST to generate the right initialization code for our Nucleo. Lastly, we used ST-Link Utility to upload generated binary code on the target MCU. In the &lt;a href="https://www.carminenoviello.com/?p=1256" title="Setting up a GCC/Eclipse toolchain for STM32Nucleo – Part II"&gt;second part&lt;/a&gt; we&amp;rsquo;ve taken a deeper look in the debug topic. We&amp;rsquo;ve configured OpenOCD and GDB to allow step-by-step execution of our application on the Nucleo target MCU.&lt;/p&gt;</description></item><item><title>Setting up a GCC/Eclipse toolchain for STM32Nucleo – Part II</title><link>https://www.carminenoviello.com/2015/01/07/setting-gcceclipse-toolchain-stm32nucleo-part-2/</link><pubDate>Wed, 07 Jan 2015 14:13:50 +0000</pubDate><guid>https://www.carminenoviello.com/2015/01/07/setting-gcceclipse-toolchain-stm32nucleo-part-2/</guid><description>&lt;aside class="callout callout--info" role="note" aria-label="Note"&gt;&#10; &lt;p class="callout__title"&gt;Note&lt;/p&gt;&#10; &lt;div class="callout__content"&gt;&lt;p&gt;&lt;strong&gt;Please, read carefully.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;Thanks to the feedbacks I have received, I reached to the conclusion that it&amp;rsquo;s really hard to cover a topic like this one in the room of a blog post. So, I started writing a book about the STM32 platform. In the free book sample you can find the whole complete procedure better explained. You can download it &lt;a href="https://leanpub.com/mastering-stm32"&gt;from here&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/aside&gt;&#10;&#10;&lt;p&gt;In the &lt;a href="https://www.carminenoviello.com/?p=998" title="Setting up a GCC/Eclipse toolchain for STM32Nucleo – Part I"&gt;first part&lt;/a&gt; of this series we&amp;rsquo;ve successfully setup a minimal yet working tool-chain to develop applications for the STM32 family (we&amp;rsquo;ve especially focused on STM32Nucleo developing board). We&amp;rsquo;ve based the tool-chain over the Eclipse IDE and the GCC cross-compiler for ARM Cortex platform. We&amp;rsquo;ve also created a test project (a simple blinking LED) and uploaded it on our Nucleo using the ST-Link Utility.&lt;/p&gt;</description></item><item><title>Setting up a GCC/Eclipse toolchain for STM32Nucleo - Part I</title><link>https://www.carminenoviello.com/2014/12/28/setting-gcceclipse-toolchain-stm32nucleo-part-1/</link><pubDate>Sun, 28 Dec 2014 17:09:33 +0000</pubDate><guid>https://www.carminenoviello.com/2014/12/28/setting-gcceclipse-toolchain-stm32nucleo-part-1/</guid><description>&lt;aside class="callout callout--info" role="note" aria-label="Note"&gt;&#10; &lt;p class="callout__title"&gt;Note&lt;/p&gt;&#10; &lt;div class="callout__content"&gt;&lt;p&gt;&lt;strong&gt;Please, read carefully.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;Thanks to the feedbacks I have received, I reached to the conclusion that it&amp;rsquo;s really hard to cover a topic like this one in the room of a blog post. So, I started writing a book about the STM32 platform. In the free book sample you can find the whole complete procedure better explained. You can download it &lt;a href="https://leanpub.com/mastering-stm32"&gt;from here&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/aside&gt;&#10;&#10;&lt;p&gt;I recently got in my hands a new development board from STMicroelectronics: STM32Nucleo. It&amp;rsquo;s a development board based on the STM32 MCU and it is compatible with the Arduino UNO pinout. This means that it&amp;rsquo;s possible to use the hundreds of shields available for the Arduino. However this is true in theory, since the most important aspect of Arduino&amp;rsquo;s world is the software (based on libraries, examples, and so on) made for this popular platform.&lt;/p&gt;</description></item></channel></rss>