Alex079 / vscode-avr-helper

Helper extension to simplify code compilation and flashing for AVR chips
MIT License
12 stars 1 forks source link

main.c vs main.C #22

Closed arjepsen closed 2 years ago

arjepsen commented 2 years ago

Hey. I'm trying to use the extension, but I'm running into some issues (using it on windows10)

I have a very simple main.c file that I'm trying to build. But I get:

make: *** No rule to make target '.vscode/avr.build/obj/src/main.C.o', needed by '.vscode/avr.build/output.elf'. Stop. The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command make -fc:\Users\Anders\Documents\vscode-atmega2560\NyTest\.vscode\avr.targets.mk build" terminated with exit code: 1.

I think it's something in the script, 'cause if I change the file name from main.c to mainC (capital C), I get one step further:

I belive it's something in the F.dep functions - but I haven't been able to narrow it down yet.

arjepsen commented 2 years ago

It seems the call to the F.dep functions returns both main.c and main.C....

arjepsen commented 2 years ago

I managed to get it working by removing the .C part of the F.dep functions.

Now I have another issue: I'm working with an atmel2560, and I need to supply the -D flag for avrdude. It would be great if there was a configuration option for this :-)

Alex079 commented 2 years ago

Hello! Thanks for the bug report. I will test this case with the next plugin version. Hopefully, there will be no issue :) Regarding the -D flags, this sounds like a good new feature. Can you please tell what is the use case? Is this flag supposed to be selected manually right before flashing?

arjepsen commented 2 years ago

Here's a screenshot of the result, when I try to flash: [image: image.png]

If I understand correctly, the -D flag disables the erase of the flash, which seems is unnecessary on the atmega2560. If I use the exact same command line, but with the -D flag, everything is fine. It would be awesome, if the extension had the option to leet the user customize the avrdude flags. :-)

It's already a really nice and handy extension though - I quite like it. Like I mentioned, the other issue I had, was with the F.dep functions in the makefile, that ended up returning main.c AND main.C, so I had to remove the last part of those two funtions.

Regards. Anders

On Mon, Mar 7, 2022 at 8:20 PM Alex079 @.***> wrote:

Hello! Thanks for the bug report. I will test this case with the next plugin version. Hopefully, there will be no issue :) Regarding the -D flags, this sounds like a good new feature. Can you please tell what is the use case? Is this flag supposed to be selected manually right before flashing?

— Reply to this email directly, view it on GitHub https://github.com/Alex079/vscode-avr-helper/issues/22#issuecomment-1061044796, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJOVFOZAJVNZBKW2ZZ2ATRDU6ZJJPANCNFSM5QDBSKEQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

Alex079 commented 2 years ago

Hello,

The next release will not be using make, and this kind of build problem will be gone.

I do not see right now a good and simple UI design for avrdude flags. These flags could go into extension settings and be set as needed, but then this makes it harder to change flags for one particular flashing session. Plain text input before flashing could be challenging to parse correctly. Another way is to gradually add new flags into the checklist input before flashing, but then this checklist may grow a lot and become annoying at some point. Yet another way to do it is to let the user configure flags scope: i.e. certain flags are to be selected every time before flashing, others can be set once and used for flashing without prompt. I would appreciate your opinion about this feature.

Regards. Alex

arjepsen commented 2 years ago

I think the avrdude flags wont change much - at least not for me :-) I will usually work on the same device, hooked up to the same usb port. I think for me, the best option would be to have a field available in the extension settings, were I could enter the all flags I prefer - maybe with some initial standards already entered? Anyways, that's just how I see it - YMMW :-)

Regards Anders

On Thu, Mar 10, 2022 at 11:42 PM Alex079 @.***> wrote:

Hello,

The next release will not be using make, and this kind of build problem will be gone.

I do not see right now a good and simple UI design for avrdude flags. These flags could go into extension settings and be set as needed, but then this makes it harder to change flags for one particular flashing session. Plain text input before flashing could be challenging to parse correctly. Another way is to gradually add new flags into the checklist input before flashing, but then this checklist may grow a lot and become annoying at some point. Yet another way to do it is to let the user configure flags scope: i.e. certain flags are to be selected every time before flashing, others can be set once and used for flashing without prompt. I would appreciate your opinion about this feature.

Regards. Alex

— Reply to this email directly, view it on GitHub https://github.com/Alex079/vscode-avr-helper/issues/22#issuecomment-1064581509, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJOVFO46HFF7346XDIP6XGTU7J3D7ANCNFSM5QDBSKEQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

Alex079 commented 2 years ago

released v2