Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we deprecate and remove of built-in CMSIS?! #36

Open
eldarkg opened this issue Jan 27, 2018 · 10 comments
Open

Can we deprecate and remove of built-in CMSIS?! #36

eldarkg opened this issue Jan 27, 2018 · 10 comments

Comments

@eldarkg
Copy link
Owner

eldarkg commented Jan 27, 2018

We can delete the built-in CMSIS (dirs CoreSupport) because it is old and have some issues fixed in the current version of CMSIS 5.
In README I can link to newer CoreSupport.
Are any opinions?

@eldarkg eldarkg self-assigned this Jan 27, 2018
@eldarkg eldarkg changed the title Can we deprecate of built-in CMSIS?! Can we deprecate and remove of built-in CMSIS?! Jan 27, 2018
@garou-g
Copy link
Contributor

garou-g commented Jan 27, 2018

I can't find in CMSIS repo header for core_c.m1.h that are used in MDR1986VE1T.h. So it should be?

@garou-g
Copy link
Contributor

garou-g commented Jan 27, 2018

Although they are the same, but headers in CM1 requires core_cm1.h

@eldarkg
Copy link
Owner Author

eldarkg commented Jan 27, 2018

@xgaroux CM0 and CM1 are the same programmatically. If my understand is right we can use instead file core_cm1.h file core_cm0.h. In headers I can to change core_cm1.h to core_cm0.h.

@eldarkg
Copy link
Owner Author

eldarkg commented Jan 27, 2018

Are any other objections?

@garou-g
Copy link
Contributor

garou-g commented Jan 27, 2018

No, nothing else from me.

@Amomum
Copy link
Contributor

Amomum commented Jan 30, 2018

Well, I recently did a diff between core_cm0.h from CMSIS5 and current core_cm1.h from here. There are some non-trivial differencies in structure layots and field sizes (apart from obvious differencies in whitespace, comments etc).

For example in current core_cm1.h:

 struct
 {
   uint32_t nPRIV:1;                    /*!< bit:      0  Execution privilege in Thread mode */
   uint32_t SPSEL:1;                    /*!< bit:      1  Stack to be used                   */
   uint32_t FPCA:1;                     /*!< bit:      2  FP extension active flag           */
   uint32_t _reserved0:29;              /*!< bit:  3..31  Reserved                           */
 } b;                                   /*!< Structure used for bit  access                  */
 uint32_t w;                            /*!< Type      used for word access                  */
} CONTROL_Type;

In the core_cm0 from CMSIS 5.2.0 (current stable):

  struct
  {
    uint32_t _reserved0:1;               /*!< bit:      0  Reserved */
    uint32_t SPSEL:1;                    /*!< bit:      1  Stack to be used */
    uint32_t _reserved1:30;              /*!< bit:  2..31  Reserved */
  } b;                                   /*!< Structure used for bit  access */
  uint32_t w;                            /*!< Type      used for word access */
} CONTROL_Type;

As far as I know Cortex-M1 is not officially supported by CMSIS because vendors can modify it significantly.
Also we should not forget that officially 1986VE1 is not even Cortex-M1, it's "32-bit RISC" :)

I vote for very carefull examination of differencies between cm0 and cm1 headers; then we can think about it more thoroughly.

I think we can safely remove current CMSIS for Cortex-M3.

@eldarkg
Copy link
Owner Author

eldarkg commented Jan 30, 2018

@Amomum thank u for the info. I'll check this moments.

@Amomum
Copy link
Contributor

Amomum commented Apr 17, 2018

I asked milandr support about 1986VE1 core:

а) Является ли "высокопроизводительное RISC-ядро" в 1986ВЕ1Т ядром Cortex-M1 или его "полным функциональным аналогом"?
б) Существуют ли отличия между этим ядром и ядром Cortex-M0?
в) Возможно ли использование библиотеки CMSIS версии 5, в частности, файлов core_cm0.h или core_cm0plus.h при работе с микроконтроллером 1986ВЕ1Т?

а - Ядро Cortex-M1 было разработано для FPGA. 1986ВЕ1Т - не FPGA, поэтому считайте полным функциональным аналогом.
б - Основные характеристики процессора М1 практически совпадают с вариантом M0, но при этом компанией ARM он был реализован только в виде программной модели.
в - Мы такой задачей не знимались, попробуйте. Впринципе core_cm0.h практически совпадает с core_cm1.h, на первый взгляд проблем быть не должно. CMSIS - это впринципе всего лишь текстовые define ресурсов ядра, для читабельности программистом.

So core in 1986VE1 is an analogue of Cortex-M1.

When asked about differencies in core_cm1.h and core_cm0.h:

В сравнение не углублялся.
Вполне возможно что разработчики ядра, с развитием ядра добавляют или убирают какие-то биты. То, что в одной версии было reserved стало чем-то осмысленным. В старых версиях этих битов нет, в новых есть. Поведение кристаллов будет аналогичное.
Используйте те файлы которые поставляем мы. За какие-то иные файлы отвечать не можем, поскольку их развитие не отслеживаем.

So I guess we can keep old core_cm1.h, core_cmFunc.h and core_cmInstr.h just for "Cortex-M1" MCU's. That's not very pretty but it's safe.

@eldarkg
Copy link
Owner Author

eldarkg commented Apr 18, 2018

@Amomum thank you for info

@eldarkg
Copy link
Owner Author

eldarkg commented Apr 22, 2018

In future this files will be deleted.

@eldarkg eldarkg added the bug label Apr 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants