Discussion:
CMSIS
pn_bouteville-Qt13gs6zZMY@public.gmane.org [nuttx]
2014-10-15 21:29:52 UTC
Permalink
Hello,



Currently CMSIS is like a BSD license, so do you always not degree to include it in Nuttx?


For exemple in folder /nuttx/arch/arm/{include,src}/CMSIS , like armv7-m etc..



it will be very help full.



Pierre
Sebastien Lorquet sebastien-i/0epbAZHkZGWvitb5QawA@public.gmane.org [nuttx]
2014-10-15 23:23:57 UTC
Permalink
Hello,

can you remind me what's the use for cmsis in nuttx, when every
supported cpu already has complete architecture definitions and support?

SL
Post by pn_bouteville-***@public.gmane.org [nuttx]
Hello,
Currently CMSIS is like a BSD license, so do you always not degree to include it in Nuttx?
For exemple in folder /nuttx/arch/arm/{include,src}/CMSIS , like armv7-m etc..
it will be very help full.
Pierre
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-10-15 23:47:27 UTC
Permalink
CMSIS is a third party library (from ARM, actually I think it is just header files) that provides redundant CPU definitions. It is not used by any code in NuttX. Carrying it in NuttX would be senseless and will only introduce and encourage incompatibilities. It will never be included in the NuttX repository.


But, of course, it is always available for people to use as they see fit... as long as you do no plan to include the code in NuttX. No one is restricted in anyway. I am just not going to be the redistributor of ARM code.


Greg
pn_bouteville-Qt13gs6zZMY@public.gmane.org [nuttx]
2014-10-16 11:48:41 UTC
Permalink
So, I have extracted that is needed for Cortex-M3 of CMSIS to integrate EFM32.


If I got it, file of extract of CMSIS specific for cortex-m3 (not a just a copy of some file) will should put in efm32 folder and not in armv7-m?


file names are :
cm3_asm.h
cm3_core.h
cm3_DWT.h
cm3_ITM.c
cm3_ITM.h
cm3_TPI.h


This to fit your requirement in gaol to integrate EFM32 port in official reprository Nuttx ?


Pierre
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-10-16 12:38:23 UTC
Permalink
No
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-10-16 13:16:20 UTC
Permalink
I will try to find an inexpensive EFM32 and help you do a proper EFM32 port. You really don't need any third party software, just willingness to do the work.
Sebastien Lorquet sebastien-i/0epbAZHkZGWvitb5QawA@public.gmane.org [nuttx]
2014-10-16 13:29:42 UTC
Permalink
This one seems to exist, but is not really cheap
http://www.digikey.com/product-search/en?mpart=EFM32-G8XX-STK&vendor=336
128k flash, 16k RAM

Olimex seems to have some eval boards
https://www.olimex.com/Products/ARM/EnergyMicro/EM-32G210F128-H/
Also 128k flash, 16k RAM, seems to be the maximum according to the product matrix:
http://www.silabs.com/products/mcu/lowpower/pages/efm32g-gecko.aspx

That's not a lot of memory, but should be usable, right?

Resources found via:
http://www.mikrocontroller.net/articles/EFM32

Sébastien Lorquet
Post by spudarnia-/***@public.gmane.org [nuttx]
I will try to find an inexpensive EFM32 and help you do a proper EFM32 port.
You really don't need any third party software, just willingness to do the work.
------------------------------------
Posted by: Sebastien Lorquet <sebastien-i/***@public.gmane.org>
------------------------------------


------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/nuttx/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/nuttx/join
(Yahoo! ID required)

<*> To change settings via email:
nuttx-digest-***@public.gmane.org
nuttx-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
nuttx-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-10-16 15:34:03 UTC
Permalink
I have this board but I have never done anything with it: https://www.olimex.com/Products/ARM/EnergyMicro/EM-32G880F128-STK/resources/EFM32G880F128-STK.pdf https://www.olimex.com/Products/ARM/EnergyMicro/EM-32G880F128-STK/resources/EFM32G880F128-STK.pdf


Also 128KiB/16IiB. I have a two week commitment now so I will look for something a little more current for a couple of weeks. If I don't find anything, I will probably try that board.


Greg
pn_bouteville-Qt13gs6zZMY@public.gmane.org [nuttx]
2014-10-16 18:51:56 UTC
Permalink
Why nvic.h is in armv7-v and use by stm32 ?

for me Systick ITM DWT and SCB are same in all cortex-m ?


But ok, I understood I move my cortex-m3 file in efm32 folder no problem.
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-10-16 19:00:29 UTC
Permalink
Post by pn_bouteville-***@public.gmane.org [nuttx]
Why nvic.h is in armv7-v and use by stm32 ?
for me Systick ITM DWT and SCB are same in all cortex-m ?
I am no sure exactly what you are saying:


$ find arch/arm/src -name nvic.h
arch/arm/src/armv6-m/nvic.h
arch/arm/src/armv7-m/nvic.h


armv7-m is the Cortex-M architectures. STM32 is a Cortex-M.
Post by pn_bouteville-***@public.gmane.org [nuttx]
But ok, I understood I move my cortex-m3 file in efm32 folder no problem.
I still will not commit it to the repository. But I will fix the code before it is committed.


Greg
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-10-16 19:03:09 UTC
Permalink
I got a good deal for this EFM32 Gecko Starter Kit on eBay: EFM32 GECKO STARTER KIT http://www.ebay.com/itm/121461651012


http://www.ebay.com/itm/121461651012

EFM32 GECKO STARTER KIT http://www.ebay.com/itm/121461651012 US $40.00 New other (see details) in Business & Industrial, Electrical & Test Equipment, Electronic Components



View on www.ebay.com http://www.ebay.com/itm/121461651012
Preview by Yahoo




It will be a couple of weeks before it makes it to Costa Rica.


Greg
pn_bouteville-Qt13gs6zZMY@public.gmane.org [nuttx]
2014-10-16 20:50:14 UTC
Permalink
on my github (pnb990/nuttx) I was ported a little STK3300 with only keypad and lowputc drivers ( only 32KB Flash and 4kB of RAM ) but this memory size is very just, but nuttx works on it


Currently I have received my custom board. I'm starting incorporate spi for an SDCard, then an LCD.
EFM32 used is EFM32GG332F1024 (1MB Flash, 128k RAM).


LCD is http://www.mouser.fr/Search/ProductDetail.aspx?R=NHD-C12864KGZ-FSW-GBWvirtualkey66010000virtualkey763-C12864KGZFSW-GBW http://www.mouser.fr/Search/ProductDetail.aspx?R=NHD-C12864KGZ-FSW-GBWvirtualkey66010000virtualkey763-C12864KGZFSW-GBW
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-10-20 14:52:26 UTC
Permalink
Hi, Pierre,


I have committed a version of the EFM32 MCU support under arch/arm/include/efm32 and arch/arm/src/efm32. This support based largely on your GitHub work but is also very different:


- It does not use CMSIS,


- It does not use the EM library


- Several things were restructured to be more compatible with the way things are done on other platforms (like GPIO interrupt handler).


- U[S]ART support was added, but there is no ITM support.


ITM would make a great SYSLOG device (output only debug information), but not a good, general purpose serial console as need by most applications.


Of course, this is untested. I should have the Gecko Starter Kit in the mail in a couple of weeks (it takes a long time for packages to get to Costa Rica). I may add support for the Olimex board that I have now, but I would prefer to wait for the Starter Kit because it has a J-Link on board. I may not have a compatible debugger for the Olimex board.


I see that you have made a lot of progress on your Gecko Giant board on GitHub. You may not want to use these changes that I have committed since they go in a different direction. I understand that; you have a lot committed in the direction that you are going now.


Greg
pn_bouteville-Qt13gs6zZMY@public.gmane.org [nuttx]
2014-10-20 19:43:18 UTC
Permalink
Ok Many thanks for your help!



but I have 2 questions:


* I some application we cannot wast an U(S)ART for debug log, and in my configuration just put en FTDI Cable on swo to get system log. So Can implement that well ?


* EFM32 USART peripheral can be use for I2S, IRDA, SPI and UART, So I your implementation I can't see we select that ?


Pierre
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-10-20 20:09:51 UTC
Permalink
Hi, Pierre,
Post by pn_bouteville-***@public.gmane.org [nuttx]
* I some application we cannot wast an U(S)ART for debug log, and in my configuration just put en FTDI Cable on swo to get system log. So Can implement that well ?
We need to make a distinction between a serial console which is used for human interaction and the system log. These do not have to be the same device. ITM would make a good system log, but not a good serial console.


USB serial also makes a good console. The only problem is that USB drivers are difficult and time-consuming to write and test. None of the parts that I have support USB.
Post by pn_bouteville-***@public.gmane.org [nuttx]
* EFM32 USART peripheral can be use for I2S, IRDA, SPI and UART, So I your implementation I can't see we select that ?
Is this a problem for UARTs too? Not for LEUARTs, right? You would have to add options in arch/arm/src/efm32/Kconfig to select other operations.


Note that there are some settings now to say that a USART is or is not configured to be a UART in nuttx/drivers/serial/Kconfig:


comment "USART Configuration"


config USART0_ISUART
bool "USART0 is a UART"
default y
depends on ARCH_HAVE_USART0
select MCU_SERIAL


config USART1_ISUART
bool "USART1 is a UART"
default y
depends on ARCH_HAVE_USART1
select MCU_SERIAL
... etc. ...


Greg
pn_bouteville-Qt13gs6zZMY@public.gmane.org [nuttx]
2014-10-20 21:17:46 UTC
Permalink
* for ITM I will look later.



* For UART is same driver that USART but without synchronous mode (SPI, I2S) neither Irda.


* LEUART is an UART with possibility of IRDA modulation, but this driver is different of USART


* for spi, I start to add a structure that describe for each board howto configure USART
https://github.com/pnb990/nuttx/blob/master/nuttx/arch/arm/src/efm32/efm32_spi.c https://github.com/pnb990/nuttx/blob/master/nuttx/arch/arm/src/efm32/efm32_spi.c
https://github.com/pnb990/nuttx/blob/master/nuttx/arch/arm/src/efm32/efm32_spi.h https://github.com/pnb990/nuttx/blob/master/nuttx/arch/arm/src/efm32/efm32_spi.h

This structure that explain to UART, SPI, I2S drivers ( only spi for moment):
-- Which USART use
-- location to use.
-- Which pin to enable or disable.


* I'm working on EFM32 for 3 years. This micro-controller is very flexible, so if you put all configuration in KCONFIG, it may be very difficult to understand driver code.


Pierre
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-10-20 22:29:08 UTC
Permalink
Post by pn_bouteville-***@public.gmane.org [nuttx]
* for ITM I will look later.
Setting up ITM for debug output should be pretty easy. You could use what you have now: Just rename your up_lowputc() to syslog_putc() and enable CONFIG_SYSLOG=y. Then debug output would all be directed to the ITM and you can still use a serial console if you want.


up_lowputc() is only used in two places that I can think of: It is called from up_putc() in the serial driver (hence, the coupling to the serial console) and from the low level boot code to output ABDEF. That is all.


Writing an LEUART driver would be very easy. Probably only a couple of hours of effort, cloning from efm32_serial.c. The Olimex board that I have has its RS232 driver on LEUART1. I did create a configuration for the Olimex board, but I can't use it because I don't have a compatible SWD debugger for it. I will have to wait for the Gecko Starter Kit.


Greg
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-10-21 22:51:13 UTC
Permalink
I finally had a chance to review the ITM, DWT, and TPI files that you extracted from CMSIS. And I have had a change of heart; these are all new definitions and do not duplicate existing definitions. So I then have no reason to oppose committing them to the repository. I am only opposed to trying to build a cohesive OS with multiple, different definitions of the same thing.


So I modified your files to conform to NuttX naming conventions and coding style and pushed them to the NuttX repository.


Thanks... sorry to be so difficult.


Greg
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-10-21 22:52:15 UTC
Permalink
Pierre... one more thing. I also checked in an implementation of the low-energy UART serial console driver for the EFM32. You might be interested in that.


Greg
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-10-22 15:13:54 UTC
Permalink
Hi, Pierre,


I added logic that should allow you to use the ARMv7-M ITM as the SYLOG device. Without a serial console, that means that you cannot use printf(), but all of the debug instrumentation (which uses syslog()) should work. This is basically your up_lowputc() logic that has been moved to a common ARMv7-M directory and renamed syslog_putc(). I still do not have hardware to verify.


Here are the core changes:


http://sourceforge.net/p/nuttx/git/ci/272f976eaa86c3bfa0381f1b4695ce605c256319/
http://sourceforge.net/p/nuttx/git/ci/4f552b68d033fdb545356f8610084fe984714418/


Greg
pn_bouteville-Qt13gs6zZMY@public.gmane.org [nuttx]
2014-10-22 16:31:36 UTC
Permalink
Sorry for this delay and many thanks for your help!

For LEUART, right now I don't use it.


For ITM and syslog it is ok for me even I think that printf may be redirect to ITM if no console is compiled.


I will not have enough time this evening to test it sorry.

pn_bouteville-Qt13gs6zZMY@public.gmane.org [nuttx]
2014-10-16 11:54:38 UTC
Permalink
Hi Sebastien,



It is to port EFM32 in Nuttx.


CMSIS part are only to help for integrate code from emlib silicon labs in nuttx efm32 drivers.


It will be in any case use out side of low level nuttx drivers. In my case for EFM32.


Pierre
Sebastien Lorquet sebastien-i/0epbAZHkZGWvitb5QawA@public.gmane.org [nuttx]
2014-10-16 11:59:15 UTC
Permalink
but it's just another ARM SoC... Headers and code should go into
arch/arm/src/efm32, like is done for other chips!

Why is cmsis required?

Nuttx core sources have always been self-containted with no external build
dependencies.

BR

Sébastien Lorquet
Post by pn_bouteville-***@public.gmane.org [nuttx]
Hi Sebastien,
It is to port EFM32 in Nuttx.
CMSIS part are only to help for integrate code from emlib silicon labs in nuttx
efm32 drivers.
It will be in any case use out side of low level nuttx drivers. In my case for EFM32.
Pierre
------------------------------------
Posted by: Sebastien Lorquet <sebastien-i/***@public.gmane.org>
------------------------------------


------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/nuttx/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/nuttx/join
(Yahoo! ID required)

<*> To change settings via email:
nuttx-digest-***@public.gmane.org
nuttx-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
nuttx-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-10-15 23:27:11 UTC
Permalink
No... but of course you are free to keep a copy of CMSIS in your own version of the code.


Greg
Loading...