Simplicity Studio 5, EFM32, Minimal project - Page 1
Forum section: electronics / general

author: igendel
author_rank: Frequent Contributor
timestamp: February 28, 2021, 01:18:17 pm
content: Hi,Please, no "Why would you want to do that?"With an EFM8 evaluation board (EFM8BB1LCB), the IDE offers a "Blank C Project" that's truly minimal - just the header with all the #DEFINEs for the MCU's registers, a boilerplate main.c etc., and it compiles.For the EFM32GG12 Thunderboard, however, there are only example projects with alotof dependencies, files, headers and HALs. When I try to create a blank project on my own, it always complains about missing definitions that I don't know where to find or how to add. I tried Google, no useful answers there.This is my first time with EFM32, almost no experience with ARM in general. I would just like to set up a compilable project, with the register definitions, perhaps CMSIS, to get me started at a bare-metal level.Is there a step-by-step guide I missed somehow, or other specific advice?Thanks,

author: Bassman59
author_rank: Super Contributor
timestamp: March 01, 2021, 07:32:11 pm
content: In Simplicity Studio 5, create a new project: File -> New -> Silicon Labs Project WizardThen select your board, which automatically selects the target, then select the SDK and toolchain. Click next.You'll land at "Example Project Selection." I've found the best thing for a "project zero" is to select "Hardware Configurator Project." This creates a project skeleton with the correct build settings.Oddly this doesn't create the Hardware Configurator document. So select the top of the project, right-click, choose "new -> other ..." then in the Simplicity Studio option choose "Simplicity Configurator Document." That's helpful for setting up the peripherals and the pinouts.

author: igendel
author_rank: Frequent Contributor
timestamp: March 01, 2021, 10:59:48 pm
content: Thanks, however...Quote from: Bassman59 on March 01, 2021, 07:32:11 pmIf I selectNoneas SDK, the only project offered is the "RTCC to wake from EM4" example project.I assume8051 SDKis irrelevant here, so the only option left is theGecko SDK Suite [...]. It gives me 48 different example project but none of them is "Hardware Configurator".If I choose the "Empty C Project" example project, it gets created and it compiles, but it's far from empty - just the #include part in main.c looks like this, definitely not bare metal:Code:#include "sl_component_catalog.h"#include "sl_system_init.h"#include "app.h"#if defined(SL_CATALOG_POWER_MANAGER_PRESENT)#include "sl_power_manager.h"#endif#if defined(SL_CATALOG_KERNEL_PRESENT)#include "sl_system_kernel.h"#else // SL_CATALOG_KERNEL_PRESENT#include "sl_system_process_action.h"#endif // SL_CATALOG_KERNEL_PRESENTAnd there are dozens of headers and files automatically included in the project tree.

author: Bassman59
author_rank: Super Contributor
timestamp: March 01, 2021, 11:12:57 pm
content: Quote from: igendel on March 01, 2021, 10:59:48 pmI suppose you should clarify: which version of Simplicity Studio are you using? My suggestions are with SS5.That said: you are correct, when you do not choose an SDK, you don't get any example projects.So in SS5, I created a project based on your board. I selected the Gecko SDK, I think it's 5.10.2 but that doesn't matter. I told it to make an Empty C project.main.c as created by the project wizard is:Code:#include "em_device.h"#include "em_chip.h"int main(void){/* Chip errata */CHIP_Init();/* Infinite loop */while (1) {}}and it has the CMSIS startup files and a folder called emlib which gets populated by drivers if you choose to use the hardware configurator.

author: igendel
author_rank: Frequent Contributor
timestamp: March 01, 2021, 11:28:36 pm
content: Quote from: Bassman59 on March 01, 2021, 11:12:57 pmYeah, it kind of says that in the title of my postQuote from: Bassman59 on March 01, 2021, 11:12:57 pmI'd probably be happy with what you got in that project, but I get different content, as I copy-pasted above. The Gecko SDK version I have is 6.0.

author: Bassman59
author_rank: Super Contributor
timestamp: March 02, 2021, 04:14:13 am
content: Oh, fer feck's sake. I haven't used Simplicity Studio in a while, so I updated it, and tap-dancing jeebus h. xmas on a Popsicle stick they went and changed everything for this new version 6 of the Gecko stuff.I give up.

author: igendel
author_rank: Frequent Contributor
timestamp: March 02, 2021, 10:59:57 am
content: Quote from: Bassman59 on March 02, 2021, 04:14:13 amAt least I got a very colorful expression to use in similar, future casesThanks for trying!Important edit:It turns out I can install the previous SDK and open emptier projects from it. They still have tons of files in the "Includes" section, but apparently they are not used by default. Now the real work begins

author: Bassman59
author_rank: Super Contributor
timestamp: March 02, 2021, 06:57:52 pm
content: Quote from: igendel on March 02, 2021, 10:59:57 amFor what it's worth, I was able to build up a USB MIDI class device based on the EFM32GG. It also used a UART for the old-style serial MIDI. I first did this with an EFM8UB2 and ported it. The USB peripheral appears to be the same in both parts, and the USB stack was highly similar. This was with Simplicity Studio 4 and whatever version of the SDKs they had a couple of years ago.I hope they didn't change the USB stack, because of all of the micros I've looked at with USB (TI Tiva M4, NXP LPC55x and LPC54x, Atmel SAME70) it was the easiest to extend to USB device classes for which they didn't already have canned code. Too bad that it's Full Speed only. Come on, SiLabs, get with the program!

author: igendel
author_rank: Frequent Contributor
timestamp: March 03, 2021, 02:10:23 pm
content: Quote from: Bassman59 on March 02, 2021, 06:57:52 pmI'm still far from anything USB, but it's good to know that (at least in theory) this MCU/Ecosystem has such advantages over competition.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: March 11, 2021, 05:06:38 pm
content: Just the name of "simplicity studio" raises my neck hairs.I get visions of disparate attempts to hide anything that could be interpreted as "complex" in such a convoluted way that it's impossible to make sense of it.I do applaud them however for stating on their front page that their IDE is based on Eclipse. (This is not the same as saying I like Eclipse, that's another subject). I would not describe Eclipse as "simple" however, I think that is something we can agree on.I do not understand this fetish for data hiding and automation. I do know that "data hiding" is a thing in software design, but it is not intended to be used in this way. The Idea is to add hierarchy in the way data is presented, so you can quickly find the level which you need to do **whatever**.Maybe I'm old fashioned. I do not like the makefile syntax and what people do with them, but apart from that I still prefer to manage projects via a 20 line or so makefile. Just pull in some header files you need and external dependencies add a path to the compiler and off you go.And then configure whatever IDE you happen to fancy this last week on top of that. If your IDE gets *&^%$#@! you simply delete all it's configuration files and start over. If it happens too often, then the whole IDE goes down the drain and you get another, and use it with the same 20 line makefile for your project.Manufacturers of microcontrollers very much like to present an "everything together" approach, and the main reason for doing so is apparently to tie you into their infrastructure. It is not in their interest to give you tools that work as best as they could and are easily configurable. They just give you tools that appear to be so, but whose internals are a convoluted mess on the inside and a shaky stack of cobbled together parts.

author: igendel
author_rank: Frequent Contributor
timestamp: March 11, 2021, 11:26:55 pm
content: Quote from: Doctorandus_P on March 11, 2021, 05:06:38 pmHeh, yes, there's certainly some unintended irony in that name