Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

tools/sizes.py: Restore to the prior behavior regarding output destination#8572

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mcspr merged 1 commit intoesp8266:masterfromjjsuwa-sys3175:sizes_stderr
May 17, 2022

Conversation

@jjsuwa-sys3175
Copy link
Contributor

oncetools/sizes.py outputted tostderr ratherstdout beforeda4a19f

(Arduino IDE 1.8.19 for Windows doesn't capturestdout, 2.0.0-rc6 does)

@mcspr
Copy link
Collaborator

Should we, though? This is not an error, as the coloring might suggest, but a simple informative message.


BTW I thought we had an option to replaceSketch uses... lines (ref. commit comments), but...

Arduino/platform.txt

Lines 157 to 161 in1bb041b

## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.irom0\.text|\.text|\.text1|\.data|\.rodata|)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.data|\.rodata|\.bss)\s+([0-9]+).*
#recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*

It is actually something hard-coded
https://github.com/arduino/arduino-cli/blob/18cb00c25bcb5c7dfc2dc733231ff391a281899e/legacy/builder/phases/sizer.go#L97

Only future 2.0.0 IDE allows to have a custom output (by reading certain JSON field)
https://github.com/arduino/arduino-cli/blob/18cb00c25bcb5c7dfc2dc733231ff391a281899e/legacy/builder/phases/sizer.go#L52

@jjsuwa-sys3175
Copy link
ContributorAuthor

jjsuwa-sys3175 commentedMay 17, 2022
edited
Loading

This is not an error, as the coloring might suggest, but a simple informative message.

i understand what you mean, but no sizes shown actually... only in my environment?
scrnshot

better than not seeing anything, even if that color may suggest an error.

(note: applying "Show verbose output during ☑compilation" in IDE Preferences, italso becomes visible as informative, w/other unwanted misc msgs)

@mcspr
Copy link
Collaborator

Not really, based on the builder's code :/
https://github.com/arduino/arduino-cli/search?q=utils.Show+%2F*+stderr+*%2F
(also assuming current arduino-cli code is the same as the included builder one)

I have tried.postbuild, but the same rules apply

recipe.hooks.sketch.postbuild.1.pattern="{runtime.tools.python3.path}/python3" -I"{runtime.tools.sizes}" --elf"{build.path}/{build.project_name}.elf" --path"{runtime.tools.xtensa-lx106-elf-gcc.path}/bin" --mmu"{build.mmuflags}"

Oh well.

…ationonce `tools/sizes.py` outputted to `stderr` rather `stdout` beforeda4a19f(Arduino IDE 1.8.19 for Windows doesn't capture `stdout`, 2.0.0-rc6 does)
@mcsprmcspr merged commit48b60f4 intoesp8266:masterMay 17, 2022
@jjsuwa-sys3175jjsuwa-sys3175 deleted the sizes_stderr branchMay 17, 2022 14:28
@per1234
Copy link
Contributor

Arduino IDE 1.8.19 for Windows doesn't capture stdout, 2.0.0-rc6 does

I happened to take a look at this today, and was confused by the quoted statement. Since the "why is it printed in red in the IDE" question is likely to be raised by the users periodically, I'll add some information here:

When the "Show verbose output during: ☐ compilation" Arduino IDE preference is disabled, the IDE only prints the output from the stderr stream of the compilation commands. The stdout stream output of the commands is only printed when that preference is enabled.

This handling of compilation output is the same in Arduino IDE 1.x and 2.x so I can only think of two possible causes of the claimed different behavior between the two versions:

  • The "Show verbose output during: ☐ compilation" Arduino IDE preference was set differently from one IDE to another (IDE 2.x uses a different preference store from 1.x)
  • This bug:Verbose output preferences are not applied correctly arduino/arduino-ide#374 that caused verbose compilation output on upload when verbose upload output was enabled, which has been fixed since Arduino IDE 2.0.0-rc9.1

hasenradball pushed a commit to hasenradball/Arduino that referenced this pull requestNov 18, 2024
…ation (esp8266#8572)once `tools/sizes.py` outputted to `stderr` rather `stdout` beforeda4a19f(Arduino IDE 1.8.19 for Windows doesn't capture `stdout`, 2.0.0-rc6 does)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@mcsprmcsprmcspr left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@jjsuwa-sys3175@mcspr@per1234

[8]ページ先頭

©2009-2025 Movatter.jp