[GSoC 2020] Port FreeRTOS to Portenta

GSoC 2020 1st Week Report

Arduino: Port FreeRTOS to Portenta H7, Zhihong Niu

Major Progress

  • Familiar with Portenta H7 development workflow.
  • Obtain the necessary information about Portenta from mentors.
  • Build development environment.

Work Completed

  • Refer to ArduinoCore-mbed to build development environment

By observing the compilation output of the Arduino IDE, a preliminary Makefile environment is built.

  • Improve work plan

Two sets of schemes are summarized: 1. Gradually add code based on the built Makefile framework, and finally complete the project; 2. Refer to the structure of ArduinoCore-mbed and gradually replace it. Will choose to use according to the actual situation.

Deficiencies

  • The work is not expected to be complicated enough and not fully prepared.
  • Unfamiliar with Arduino tools, spent a lot of time familiarizing.

Plan

  • Continue to build the environment.
  • Continue to improve the work plan.
  • Carry out preliminary tests after the completion of environmental construction and work plan.

GSoC 2020 2nd Week Report

Arduino: Port FreeRTOS to Portenta H7, Zhihong Niu

Major Progress

  • Improve Makefile
  • Working on porting FreeRTOS

Work Completed

  • Initial porting of FreeRTOS

Deficiencies

  • Encountered difficulties in the link script.

Plan

  • Figure out the principle of the link script
  • Complete FreeRTOS porting

Hi Zhihong Niu. It sounds like you're making some good progress. Is this the repository where we can follow your work?: https://github.com/MRNIU/FreeRTOS-PortentaH7

pert: Hi Zhihong Niu. It sounds like you're making some good progress. Is this the repository where we can follow your work?: https://github.com/MRNIU/FreeRTOS-PortentaH7

Yes it is. Any suggestions are welcome.

GSoC 2020 3rd Week Report

Arduino: Port FreeRTOS to Portenta H7, Zhihong Niu

Major Progress

  • FreeRTOS almost there.

Work Completed

  • FreeRTOS now available on Portenta theoretical, need test.

Deficiencies

  • Some mistake on upload, resolved.

Plan

  • Test
  • Begin port ArduinoCore.

GSoC 2020 4th Week Report

Arduino: Port FreeRTOS to Portenta H7, Zhihong Niu

Major Progress

  • Debug

Work Completed

  • Try to test the code, but there are some problems at hardware initialization, its difficult for me.
  • Basic code for ArduinoCore-freertos, some details need to discuss.

Deficiencies

  • Not understand what happened during the hardware initialization, what functions do I need to call to be correct? I am working hard on it.

Plan

  • Test
  • Begin port ArduinoCore code.

GSoC 2020 5th Week Report

Arduino: Port FreeRTOS to Portenta H7, Zhihong Niu

Major Progress

  • Running FreeRTOS on Portenta H7 successful.

Work Completed

  • Run FreeRTOS on Portenta H7, testing is under way.

Deficiencies

  • Some bug in hardware init and task scheduler.

Plan

  • Fix known bugs.
  • Write ArduinoCore-freertos.
  • Add comments makes it easy for people to know where I am having trouble, and how was it solved.

GSoC 2020 6th Week Report

Arduino: Port FreeRTOS to Portenta H7, Zhihong Niu

Major Progress

  • Write dev log.
  • Studied the implementation of mbed.
  • The overall scheme for ArduinoCore-freertos has been completed.

Work Completed

  • The overall scheme for ArduinoCore-freertos.

Deficiencies

  • Because I was not familiar with mbed, I made a wrong plan at the beginning, but fortunately I corrected it in time later.

Plan

  • Realize the transformation between Arduino and STM32_HAL.

GSoC 2020 7th Week Report

Arduino: Port FreeRTOS to Portenta H7, Zhihong Niu

Major Progress

  • Working on gpio operation.

Work Completed

  • Implementation of some top-level functions, and the gpio operation almost done.

Deficiencies

  • The definition of the pin between Arduino and STM32 puzzled me for a while. Fortunately, the implementation of mbed helped me solve this problem.

Plan

  • Finish gpio operation.

GSoC 2020 8th Week Report

Arduino: Port FreeRTOS to Portenta H7, Zhihong Niu

Major Progress

  • Find out a useful repo: Arduino_Core_STM32, I'm reading its code.

Work Completed

  • Checkout a new branch stm32, I wanna combine Arduino_Core_STM32 and ArduinoCore-mbed.

Deficiencies

  • The past week has gone well.

Plan

  • Complete the code based on Arduino_Core_STM32 and ArduinoCore-mbed.

GSoC 2020 9th Week Report

Arduino: Port FreeRTOS to Portenta H7, Zhihong Niu

Major Progress

  • Working on add new variant for Arduino_Core_STM32

Work Completed

  • Learning how to use platform.txt and boards.txt

Deficiencies

  • No questions here.

Plan

  • Add PORTENTA H7 for Arduino_Core_STM32, maybe a PR for that.

GSoC 2020 10th Week Report

Arduino: Port FreeRTOS to Portenta H7, Zhihong Niu

Major Progress

  • Successfully compiled code with the Arduino IDE.

Work Completed

  • Now you can compile the code with Arduino IDE.

Deficiencies

  • Although it can compile, the response is not visible on the hardware.

Plan

  • Add FreeRTOS support.
  • Fix bug.

GSoC 2020 11th Week Report

Arduino: Port FreeRTOS to Portenta H7, Zhihong Niu

Major Progress

  • ArduinoCore-freertos almost there.

Work Completed

  • Handle details, finish the stm32 branch.

Deficiencies

  • LED flash after upload, do not know what is the meaning

Plan

  • Fix bug.
  • Clean up code style.

ptrnull: - LED flash after upload, do not know what is the meaning

Is it the 4X long, 4X short blink pattern?

pert: Is it the 4X long, 4X short blink pattern?

Yes, my mentor tell me it means Mbed OS has crashed. I have already fixed this mistake. Thank you.

I'm glad to hear it! That was actually me chatting with you about this subject on Arduino's Slack also.

pert: I'm glad to hear it! That was actually me chatting with you about this subject on Arduino's Slack also.

What a surprise! Thanks for your help!

GSoC 2020 12th Week Report

Arduino: Port FreeRTOS to Portenta H7, Zhihong Niu

Major Progress

  • Debug.

Work Completed

  • Fix the bug I mentioned last week.

Deficiencies

  • New bugs are coming.

Plan

  • Fix bug.
  • Apply my ideas to the AVR platform.
  • Prepare the materials to be submitted to GSoC.

GSoC 2020 13th Week Report

Arduino: Port FreeRTOS to Portenta H7, Zhihong Niu

Major Progress

  • Now FreeRTOS is available on Arduino UNO

Work Completed

  • Test FreeRTOS on Arduino UNO

Deficiencies

  • None

Plan

  • Fix bug.
  • Support more boards

GSoC 2020 Final Report

Arduino: Port FreeRTOS to Portenta H7, Zhihong Niu

I am honored to be part of the Arduino community, GSoC 2020 is over, but there are still imperfections in my work, I will working on that in my repo, and will not continue to post here.

Thank you Arduino community!