You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"make-timonel-sh" doesn't execute under Linux (more properly when I use it from bash shell)
./make-timonel.sh: 40: ./make-timonel.sh: function: not found
(then the "Usage text"
./make-timonel.sh: 79: ./make-timonel.sh: Syntax error: "}" unexpected
Problem seems to be line 1 hash-bang
#!/bin/sh
If I change this #!/bin/bash, it works
I suspect that your development environment regards bash and sh as functionally equivalent. but for me sh and bash are different executables. Lordy, lordy, I love Unix but how many shells can one operating system need? The documentation says that sh is synonym for dash, but that bash is different. Presumably my sh (dash) doesn't like your function syntax.... argggh. Workaround for me is to edit line 1. as noted above. I'm not really sure what linux best practice is here, and if there some incantation which always picks the right shell? I didn't want to submit a PR not knowing best practice.
As a sanity check, the sample output for ./make-timonel.sh tml-t85-small timonel 13 1B80 1 false is attached below.
Starting Timonel compilation with these parameters:
Configuration: tml-t85-small
Binary file: timonel.hex
TWI address: 13
Flash position: 1B80 <- In case of errors, use lower positions!
I couldn't come to a definitive conclusion on what the correct hash-bang should be in this case.
I did several tests with "make-timonel.sh" on Fedora and CentOS and using #!/bin/sh or #!/bin/bash seems to be indistinct for this script. Maybe on non-Red Hat-like Linux distros, is not like this.
Given that #!/bin/bash also works fine for Git Bash on Windows, I'll use it everywhere, so this problem, for the moment, could be considered solved this way.
"make-timonel-sh" doesn't execute under Linux (more properly when I use it from bash shell)
./make-timonel.sh: 40: ./make-timonel.sh: function: not found
(then the "Usage text"
./make-timonel.sh: 79: ./make-timonel.sh: Syntax error: "}" unexpected
Problem seems to be line 1 hash-bang
#!/bin/sh
If I change this #!/bin/bash, it works
I suspect that your development environment regards bash and sh as functionally equivalent. but for me sh and bash are different executables. Lordy, lordy, I love Unix but how many shells can one operating system need? The documentation says that sh is synonym for dash, but that bash is different. Presumably my sh (dash) doesn't like your function syntax.... argggh. Workaround for me is to edit line 1. as noted above. I'm not really sure what linux best practice is here, and if there some incantation which always picks the right shell? I didn't want to submit a PR not knowing best practice.
As a sanity check, the sample output for ./make-timonel.sh tml-t85-small timonel 13 1B80 1 false is attached below.
RUNNING: make all CONFIG=tml-t85-small TARGET=timonel TIMONEL_TWI_ADDR=13 TIMONEL_START=1B80 LOW_FUSE=0x62 AUTO_CLK_TWEAK=false
========================================================================
[Sections]
text data bss dec hex filename
896 0 198 1094 446 timonel.bin
[Hexfile] Take "data" size to calculate the bootloader's start address!
text data bss dec hex filename
0 896 0 896 380 timonel.hex
The text was updated successfully, but these errors were encountered: