PWM can not get supported as well in NON-OS SDK2.0.0 AT version

YimingLi

PWM can not get supported as well in NON-OS SDK2.0.0 AT version

Postby YimingLi » Tue Nov 01, 2016 11:17 pm

Hi Espressif,

In the latest release of SDK 2.0.0 Non-OS, it is hard to add into PWM features by "-lpwm" during link with an error "section .text will not fit into region iram1_0 seg". However, this is not present in previous version such as SDK 1.4.0.

Reproducing Steps:

1. unzip the original SDK package and goto SDK subdirectory "example/AT".
2. Build the original release. Everything will be OK and bin files get generated OK.

3. Add "-lpwm" into the makefile link flags (so as to link the pwm libray). Meanwhle, add a call of a pwm_init() into the user_init() of user_main.c (so as to the pwm libray will be linked really). Keep untouched anything else.

4. Then build. And you will encounter an error " "section .text will not fit into region iram1_0 seg" in the last step of linking.

Please fix this issue if any or optimise the iram usage for AT version, or give some suggstions. Thanks!

Related issue: viewtopic.php?f=7&t=2794

pratik

Re: PWM can not get supported as well in NON-OS SDK2.0.0 AT version

Postby pratik » Sat Nov 12, 2016 8:22 pm

You may actually try to relocate the PWM library to flash by modifying the LD files. I'm sure it will compile then, but not sure if the PWM functions will work reliably (did not test it out yet). You may try this if you want to:

In the ld folder of nonOS SDK v.2.0.0, open all ld files and find this line:
*libmbedtls.a:(.literal .text .literal.* .text.*)

Add this line below it:
*libpwm.a:(.literal .text .literal.* .text.*)

This will specify that the pwm library should be placed in the iCache. Let me know if this causes crashes (internal SDK code is not known to me). If this fails, I will request a firmware developer to assist you.

YimingLi

Re: PWM can not get supported as well in NON-OS SDK2.0.0 AT version

Postby YimingLi » Fri Dec 02, 2016 1:13 am

Thanks.

But make no difference, still gives " section '.text' will not fit in region iram1_0_seg".

Yiming Li

pratik

Re: PWM can not get supported as well in NON-OS SDK2.0.0 AT version

Postby pratik » Sun Dec 11, 2016 1:13 pm

It compiles fine here!
You are probably modifying the wrong LD file. The LD file used for linking depends on your flash config. If in doubt, modify all LD files.

Who is online

Users browsing this forum: No registered users and 56 guests