8000 Make `next_code_allocation` and `prev_traceback_allocation` movable by microdev1 · Pull Request #5333 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

Make next_code_allocation and prev_traceback_allocation movable #5333

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

Merged
merged 4 commits into from
Sep 14, 2021
Merged

Make next_code_allocation and prev_traceback_allocation movable #5333

merged 4 commits into from
Sep 14, 2021

Conversation

microdev1
Copy link
Collaborator

Changes in this PR:

  • move the allocations to movable group.
  • revert ff807f8 which made the allocations immovable.

@microdev1 microdev1 added this to the 7.0.0 milestone Sep 12, 2021
@microdev1 microdev1 linked an issue Sep 12, 2021 that may be closed by this pull request
@jerryneedell
Copy link
Collaborator

This does fix #5332

ode done running.
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Press any key to enter the REPL. Use CTRL-D to reload.

Adafruit CircuitPython 7.0.0-rc.1-62-g7316c742c on 2021-09-12; Adafruit Feather M4 Express with samd51j19
>>> import supervisor
>>> supervisor.get_previous_traceback()
'Traceback (most recent call last):\r\n  File "code.py", line 56, in <module>\r\n  File "adafruit_rfm9x.py", line 788, in receive\r\n  File "adafruit_rfm9x.py", line 638, in rx_done\r\nKeyboardInterrupt: \n'
>>> 

Copy link
Collaborator
@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not tested by me, but looks good, and now it's all internally consistent.

@dhalbert
Copy link
Collaborator

Thank you @jerryneedell for testing.

Copy link
Collaborator
@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, bleah, I did not see the build failures. A few small builds with lots of pins are just over the flash size.

@microdev1
Copy link
Collaborator Author

A few small builds with lots of pins are just over the flash size.

Moving allocations to movable group leads to the inclusion of supervisor_move_memory() on every build.

@dhalbert
Copy link
Collaborator

@microdev1 I have a Makefile change that may fix the overflowing builds. Could you allow me to push commits to your branch? https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests

The change is this, in ports/atmel-samd/Makefile:

--- a/ports/atmel-samd/Makefile
+++ b/po
8000
rts/atmel-samd/Makefile
@@ -150,7 +150,8 @@ else
   CFLAGS += -flto -flto-partition=none
 
   ifeq ($(CIRCUITPY_FULL_BUILD),0)
-    CFLAGS += --param inline-unit-growth=15 --param max-inline-insns-auto=20
+    # This is making the build larger in some cases (gcc 10.2.1), so turn it off for now.
+    # CFLAGS += --param inline-unit-growth=15 --param max-inline-insns-auto=20
   endif

For arduino_nano_33_iot, it makes the overflowing builds fit, and I think it will work for the other ones too. @tannewt has already fixed the pca10100 overflow in #5339.

@microdev1
Copy link
Collaborator Author

@dhalbert Thanks for looking into this. I enabled edits by maintainers on this PR so you should be able to push to my branch now.

@dhalbert
Copy link
Collaborator

I have a Makefile change that may fix the overflowing builds.

I thought this worked, but it didn't. I have evidence of something working in my terminal log, but it might have been a glitch. So I reverted this.

Copy link
Collaborator
@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@dhalbert dhalbert merged commit 59b1bed into adafruit:main Sep 14, 2021
@microdev1 microdev1 deleted the patch branch September 15, 2021 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

supervisor.get_previous_traceback() not working
3 participants
0