msdk icon indicating copy to clipboard operation
msdk copied to clipboard

chore(CMSIS,Examples,PeriphDrivers): Sync latest ME30 changes

Open sihyung-maxim opened this issue 1 year ago • 6 comments

Description

It has been awhile since the last time the feat/ME30 branch was synced up to main (May). Most people should be aware that the feat/ME30 contains the latest files, and the ME30 files in main have been out of date.

Some highlights:

  • Add I3C, Boost, RSTZ, Frequency Counter, MPC, SPC, and NSPC registers.
  • Add trustzone support to build system: memory definitions are done by build system.
  • Initial commit for MPC, SPC, and NSPC drivers (needs more testing).
  • CMSIS fixes and changes.

Checklist Before Requesting Review

  • [ ] PR Title follows correct guidelines.
  • [ ] Description of changes and all other relevant information.
  • [ ] (Optional) Link any related GitHub issues using a keyword
  • [ ] (Optional) Provide info on any relevant functional testing/validation. For API changes or significant features, this is not optional.

sihyung-maxim avatar Jul 08 '24 20:07 sihyung-maxim

MXC_INFO_MEM_BASE not accessible for non-secure mode, so this function shall be enabled only for secure mode?

image

ozersa avatar Jul 10 '24 10:07 ozersa

MXC_INFO_MEM_BASE not accessible for non-secure mode, so this function shall be enabled only for secure mode?

image

Yep, nice catch. It's now restricted for secure builds only.

sihyung-maxim avatar Jul 10 '24 18:07 sihyung-maxim

@ozersa Also not sure how you want to handle the merge conflict. (I'm assuming the current file in the branch is what we want merged in, but I will let you confirm).

sihyung-maxim avatar Jul 10 '24 18:07 sihyung-maxim

Build errors. Auto-tester is not triggering on this for some reason.

- CC /home/jhcarter/repos/msdk/Libraries/CMSIS/../PeriphDrivers/Source/FLC/flc_me30.c
/home/jhcarter/repos/msdk/Libraries/CMSIS/../PeriphDrivers/Source/FLC/flc_me30.c: In function 'MXC_FLC_GetWELR':
/home/jhcarter/repos/msdk/Libraries/CMSIS/../PeriphDrivers/Source/FLC/flc_me30.c:266:25: error: 'mxc_flc_regs_t' has no member named 'welr0'
  266 |         return &(MXC_FLC->welr0);
      |                         ^~
/home/jhcarter/repos/msdk/Libraries/CMSIS/../PeriphDrivers/Source/FLC/flc_me30.c:268:25: error: 'mxc_flc_regs_t' has no member named 'welr1'
  268 |         return &(MXC_FLC->welr1);
      |                         ^~
/home/jhcarter/repos/msdk/Libraries/CMSIS/../PeriphDrivers/Source/FLC/flc_me30.c: In function 'MXC_FLC_GetRLR':
/home/jhcarter/repos/msdk/Libraries/CMSIS/../PeriphDrivers/Source/FLC/flc_me30.c:286:25: error: 'mxc_flc_regs_t' has no member named 'rlr0'
  286 |         return &(MXC_FLC->rlr0);
      |                         ^~
/home/jhcarter/repos/msdk/Libraries/CMSIS/../PeriphDrivers/Source/FLC/flc_me30.c:288:25: error: 'mxc_flc_regs_t' has no member named 'rlr1'
  288 |         return &(MXC_FLC->rlr1);
      |                         ^~
make[1]: *** [/home/jhcarter/repos/msdk/Libraries/CMSIS/Device/Maxim/GCC/gcc.mk:538: /home/jhcarter/repos/msdk/Libraries/PeriphDrivers/bin/MAX32657/spi-v1_softfp/flc_me30.o] Error 1
make[1]: Leaving directory '/home/jhcarter/repos/msdk/Examples/MAX32657/Hello_World_TZ/Secure'
make: *** [/home/jhcarter/repos/msdk/Libraries/PeriphDrivers/periphdriver.mk:102: /home/jhcarter/repos/msdk/Libraries/PeriphDrivers/bin/MAX32657/spi-v1_softfp/libPeriphDriver_spi-v1_softfp.a] Error 2

Jake-Carter avatar Jul 16 '24 02:07 Jake-Carter

As per of final register map, some field shall be removed from osc_ctrl register

https://github.com/analogdevicesinc/msdk/blob/feat/ME30/Libraries/CMSIS/Device/Maxim/MAX32657/Include/rtc_regs.h#L216

image

ozersa avatar Aug 08 '24 11:08 ozersa

Could it be rebased onto main then merged if possible.

ozersa avatar Aug 14 '24 10:08 ozersa

To peripheral driver and CMSIS files being merged, I copied them from this branch and fixed conflicts issues, created a new PR that just focus on peripheral drivers and CMSIS files. here: https://github.com/analogdevicesinc/msdk/pull/1160 Please take a look when you get a chance.

ozersa avatar Sep 10 '24 09:09 ozersa

@analogdevicesinc/msdk - all maintainers working on MAX32657 be advised feat/ME30 has been merged into main.

I will delete feat/ME30 on friday. Please rebase all future updates onto main

Jake-Carter avatar Sep 12 '24 04:09 Jake-Carter

Please see hot fixes for build issues on zephyr side. https://github.com/analogdevicesinc/msdk/pull/1173

ozersa avatar Sep 12 '24 11:09 ozersa