Become a leader in the IoT community!

New DevHeads get a 320-point leaderboard boost when joining the DevHeads IoT Integration Community. In addition to learning and advising, active community leaders are rewarded with community recognition and free tech stuff. Start your Legendary Collaboration now!

Step 1 of 5

CREATE YOUR PROFILE *Required

Change Email
OR
Step 2 of 5

WHAT BRINGS YOU TO DEVHEADS? *Choose 1 or more

Collaboration & Work 🤝
Learn & Grow 📚
Contribute Experience & Expertise 🔧
Step 3 of 5

WHAT'S YOUR INTEREST OR EXPERTISE? *Choose 1 or more

Hardware & Design 💡
Embedded Software 💻
Edge Networking
Step 4 of 5

Personalize your profile

Step 5 of 5

Read & agree to our COMMUNITY RULES

  1. We want this server to be a welcoming space! Treat everyone with respect. Absolutely no harassment, witch hunting, sexism, racism, or hate speech will be tolerated.
  2. If you see something against the rules or something that makes you feel unsafe, let staff know by messaging @admin in the "support-tickets" tab in the Live DevChat menu.
  3. No age-restricted, obscene or NSFW content. This includes text, images, or links featuring nudity, sex, hard violence, or other graphically disturbing content.
  4. No spam. This includes DMing fellow members.
  5. You must be over the age of 18 years old to participate in our community.
  6. Our community uses Answer Overflow to index content on the web. By posting in this channel your messages will be indexed on the worldwide web to help others find answers.
  7. You agree to our Terms of Service (https://www.devheads.io/terms-of-service/) and Privacy Policy (https://www.devheads.io/privacy-policy)
By clicking "Finish", you have read and agreed to the our Terms of Service and Privacy Policy.

Can anyone guide me on porting FreeRTOS to STM32F411CEU6

@umeshlokhande sorry for mentioning. As you work with FreeRTOS a lot can you please guide me how should I can port one for my `STM32F411CEU6`

  1. undefined.elf#0000

    I am currently facing issues regarding the ISR’s

  2. ZacckOsiemo#0000

    wait this is easy what are you struggling with?

  3. undefined.elf#0000

    so I was able go compile my program just fine but i think there is some issues related to porting

  4. undefined.elf#0000

    so when I try to start the scheduler it goes into hardfault

  5. Umesh Lokhande#0000

    If you can compile code fine without any error that means you successfully ported FreeRTOS. For the second part of question, the issue could be anything from configuration parameters to code itself. As far as the issue with ISRs and scheduler. I think you need to provide more information about the exact error.

  6. undefined.elf#0000

    I was compiling the project making freeRTOS as a library but due to that it has some issues to find my ISR’s needed for context switching so even the code was compiling fine when the scheduler starts it was looking for the first task with the help of and ISR since those ISR wasn’t detected due to compiling freeRTOS as a library it went into hardfault

  7. Marvee Amasi#0000

    Okay happy it was fixed

  8. undefined.elf#0000

    0image.png

  9. undefined.elf#0000

    The issue is fixed and also I have implemented own `printk`

  10. undefined.elf#0000

    now it is ready to work on

  11. undefined.elf#0000

    FreeRTOS has some trace debug function

  12. undefined.elf#0000

    I have to deep dive a bit i think

  13. Marvee Amasi#0000

    Now that the basics are working, have you considered adding any additional features or optimizations to your project

  14. undefined.elf#0000

    Not yet I am trying to understand all the configuration in `FreeRTOSCOnfig.h` file

  15. undefined.elf#0000

    After that I can focus on optimization

  16. undefined.elf#0000

    can you please give me some basic idea where it can be optimized?

  17. Marvee Amasi#0000

    If so check if `configMAX_PRIORITIES` is set to an appropriate value based on how many priority levels your tasks need. Too many can waste resources, and too few can limit flexibility

  18. Marvee Amasi#0000

    And you can even use `configMINIMAL_STACK_SIZE` to keep task stack sizes minimal but still adequate

  19. Marvee Amasi#0000

    Just avoid oversized stacks, that one can consume a lot of memory

  20. undefined.elf#0000

    it was 130 before but I was facing overlfow issue so I made it 255

  21. Marvee Amasi#0000

    You might be able to reduce stack overflow risk without increasing `configMAX_PRIORITIES` by adjusting individual task stack sizes. Try using `uxTaskGetStackHighWaterMark()` to see each task’s actual stack usage

  22. Marvee Amasi#0000

    If any task is using more than expected, increase iits own specific stack size and there will be no overflow

  23. undefined.elf#0000

    I was using vsnprintf and stargs in printk i think for that also

  24. undefined.elf#0000

    those funciton’s are quite memory hungry

  25. Marvee Amasi#0000

    Ah, that makes sense , that `vsnprintf` and similar functions can definitely use a lot of stack, especially with longer strings or complex formatting

  26. undefined.elf#0000

    I limited it to 100 characters

  27. Marvee Amasi#0000

    There are still prolly ways to optimize memory usage

  28. undefined.elf#0000

    I thing that is more than enough to print some info at a time

  29. undefined.elf#0000

    Yeah let’s explore a bit <:excusemewhat:1140055557483544667>

  30. Marvee Amasi#0000

    Yh yh , that should help keep memory usage in check while still getting useful output

  31. undefined.elf#0000

    also using my ram usage is 62% out of 128KB i think that is due the heap region also right?

  32. undefined.elf#0000

    heap region is treated as occupied memory as far as i know

  33. Marvee Amasi#0000

    Exactly as you said . The heap wil take up part of the RAM, so any dynamically allocated memory adds to that usage

  34. undefined.elf#0000

    0image.png

  35. Marvee Amasi#0000

    Keeping an eye on both stack and heap allocations can help manage overall memory use efficiently ✅

  36. undefined.elf#0000

    for sure I am gonna try that after a bit exploring the basics

  37. Marvee Amasi#0000

    That wil be great

CONTRIBUTE TO THIS THREAD

Browse other questions tagged 

Leaderboard

RANKED BY XP

All time
  • 1.
    Avatar
    @Nayel115
    1620 XP
  • 2.
    Avatar
    @UcGee
    650 XP
  • 3.
    Avatar
    @melta101
    600 XP
  • 4.
    Avatar
    @lifegochi
    250 XP
  • 5.
    Avatar
    @Youuce
    180 XP
  • 6.
    Avatar
    @hemalchevli
    170 XP