manoja328 / avr-project-ide

Automatically exported from code.google.com/p/avr-project-ide
1 stars 1 forks source link

A collection of observations, feedback and requests #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
First – thanks for sharing a great tool. It literally took me 10 minutes 
to be up and programming a Tiny series MCU.

The following is a collection of observations and subjective feedback that 
you may find useful:

-   When reordering tabs in the editor pane, the new order is not 
preserved between sessions.
-   When starting API and using auto hide on the output/message/serial 
pane, it will flash disturbingly during startup.
-   Some project templates default to using the avrdude “-F” option 
which is to ignore signature. To me this appears to be 
somewhat “dangerous” as a default.
-   Most of the project templates are prefixed with “Arduino” although 
I can’t really see why.
-   The avrdude “Run Only Option” is useful for testing options. 
However if you add the “-t” option when pressing this button only - it 
could double as quick way to start avrdude in interactive mode.
-   The “Device” and “Part” drop down lists in the project 
configuration editor are not ordered and therefore awkward to browse.
-   When adding new files to a project, file type always defaults to 
the first in the list. It would be nice if it could default to whatever 
was used last (e.g. I typically use “.cpp” rather than “.c” and perhaps 
even use differentiated defaults depending on whether you right-click-add 
on Source or Header files.
-   When finding text, the highlight of found text is difficult to 
spot. Different colors as default or a way to customize would be nice.
-   Personally I think line numbers in editors is just a waste of 
space. An option to switch line numbers off would be welcomed.
-   For creating new templates, a “Save current as” option would be 
nice.
-   I like the added “#ifdef” block on empty header files. In all my 
coding however I use the “_h” suffix rather than “_inc”. An option to 
choose preference would be nice so I don’t have to change this every time.
-   I’m confused by the “Replace Previous” “Replace Next” buttons in 
the find/replace dialog. Why not copy the convention used in “Visual 
Studio”?
-   In Hardware Explorer, the “Pins” section is empty (using AtTiny85) 
although the PORT tag exists.
-   I’m not sure if burning fuses is considered implemented, but - as 
is - I have no idea what will happen if I press the burn button. We need a 
way to read current fuses and separate them as lfuse, hfuse, efuse or 
whatever convention used by the active AVR mcu before changing and burning.

The following may be somewhat more involved.

-   When developing for mcu’s with a bootloader, I do not see an easy 
way to specify the flash memory constraints that need to be observed by 
additional code.
-   When developing a bootloader, I do not see an easy way to specify 
avr-gcc start address and avrdude upload parameters for burning the 
bootloader (e.g. lock byte will typically need to be changed before/after 
uploading a bootloader).
-   I looked for a way to upload EEPROM (e.g. when setting the 
preserve eeprom fuse and having a source file with an eeprom memory 
section), but did not find any. My preference would be for avr-gcc to 
produce the eeprom image and have a separate option within the IDE to 
upload.
-    An option to download/view (and perhaps even edit) eeprom images 
would have been excellent. Avrdude however does a decent job of this in 
interactive mode.

Thanks again for an excellent contribution.

Original issue reported on code.google.com by bflaglie@c2i.net on 17 Oct 2009 at 7:33

GoogleCodeExporter commented 9 years ago
it may be possible to preserve tab ordering, i'll see what i can do

i'll play around with the autohiding panel, in my experiance, they are shown 
briefly
before hiding, which isn't much of an issue

the templates with the -F option are for Arduino only, it is required as the 
Arduino
bootloader does not support device ID

the templates prefixed with Arduino are done so because they are meant to use 
the
bootloader, the programmer is set to STK500 because the bootloader protocol is 
the
STK500's protocol

i'm not sure what you would like to see in regards to avrdude's interactive 
mode,
would you like another button just for that?

i'll add the sorting for the device and part dropdowns

i can see how remembering the last used file type could be useful, i'll add 
that later

when you say highlighting of found matches, if you use the find/replace window, 
they
are highlighted pink, if you use the panel i've made, double clicking a result 
will
select it as blue. i'm not sure what you would like to see changed

i did not write the find and replace dialog, it came with ScintillaNet. What's 
wrong
with "replace previous"?

the xml file for the attiny45 has an error, it lists the packages available as
[PDIP:SOIC:MLF], but the next xml tag is DIP. my code follows atmel's 
convention and
looks for PDIP, SOIC, and MLF tags, but they do not exist. I can add a check for
non-matching tags.

burning of fuses is implemented by the fuse box in the configuration window
the idea is that you go to the fuse calculator website, calculate the fuses 
that you
want to use, copy and paste in the arguments provided by the website into the 
"fuse
box", and then burn them once, if something is wrong such as verification error,
tweak the fuses until they burn successfully every time and save them as such.

i'm not sure how you would like to constrain the flash memory for bootloaders

anything more that involves interacting with hardware and avrdude i'd like to 
not
focus on. the editor is meant for the type of development that goes like: code 
->
compile -> burn -> observe behaviour -> repeat .
for one-time actions such as loading a bootloader, it's not that much of an 
annoyance
to somebody to just write the lock bits from the command line manually, you 
only have
to do it once. if you are developing a bootloader, just keep it unlocked during
development

for anything more that involves avrdude, i'd sugguest you look into other tools 
and
GUIs for avrdude. especially for eeprom images, as some people may keep multiple
images for different configurations and such.

Original comment by frank.zhao.main@gmail.com on 18 Oct 2009 at 6:14

GoogleCodeExporter commented 9 years ago
The pink highlight is difficult to see.

I prefer the "Find", "Replace & Find" (replace current, find next), "Replace" 
(replace current) and "Replace All" buttons in find/replace dialogs.

avrdude interactive - The current button isn't very useful (to me at least). If 
you 
add "-t" at runtime it would be.

As for fuses I wouldn't know if values are expected to be in hex, decimal, 
prefixed 
with 0x or not, space/other delimiter or not, byte order (low, high, extended 
or ...). 

When developing for a chip with bootloader, I would have to limit the size of 
my 
program to max flash less boot size. How would I specify this?

When developing a bootloader, I would need to set the load address to the start 
of 
the boot section. How would I do this?

Original comment by bflaglie@c2i.net on 18 Oct 2009 at 9:05

GoogleCodeExporter commented 9 years ago
the fuses are just more command line options for avrdude
go to the fuse calculator website (which is linked inside the config window)
http://www.engbedded.com/cgi-bin/fcx.cgi
calculate the fuses, and it should output something like

-U lfuse:w:0x42:m -U hfuse:w:0x99:m -U efuse:w:0xff:m

copy and paste that into the fuse box

there's no way to limit the size of your code other than your code, just 
remember the
limit yourself and remind yourself not to overshoot it

placing code into the bootloader memory, follow the same steps as you would 
with AVR
Studio, which is to place a flash memory segment called ".text" with the
configuration window with the correct address.

if you plan on writing a lot of bootloaders, you can write your own template 
entry
for this if you'd like

{{{
<template name="Example ATmega644P Bootloader">
  <MemorySegList>
    <Segment>
      <Name>.text</Name>
      <Type>flash</Type>
      <Addr>0x7000</Addr>
    </Segment>
  <MemorySegList>
</template>
}}}

Original comment by frank.zhao.main@gmail.com on 18 Oct 2009 at 9:31

GoogleCodeExporter commented 9 years ago
For the Arduino IDE, I would set the maximum upload size in "boards.txt" and 
have 
compiled flash sizes reported against this value. Is there a way to do this?

atmega328.upload.maximum_size=30720 (32768 less bott section)

Original comment by bflaglie@c2i.net on 18 Oct 2009 at 10:32

GoogleCodeExporter commented 9 years ago
no method for doing that, and implementing this would be a long process as it 
would
depend on so many things. it would be a low priority work item for me. it is of
course possible to retrieve the sizes from the part description xml files. i 
would
like to avoid having user input for this kind of stuff.

in the next update, i added the various bootloader sizes to be displayed, for
example, it will display

ATMEGA644P
Flash Memory: 65536 bytes ( 0x10000 )
EEPROM Memory: 2048 bytes ( 0x800 )

SRAM Size: 4096 bytes ( 0x1000 )
SRAM Starting Address: 256 ( 0x100 )

NRWW Addr: 28672 ( 0x7000 ) to 32767 ( 0x7FFF )
RWW Addr: 0 ( 0x0 ) to 28671 ( 0x6FFF )
Page Size: 128 ( 0x80 )

Boot Mode 1 Boot Size: 512 bytes ( 0x200 )
Boot Mode 1 Pages: 4
Boot Mode 1 App Start Addr: 0 ( 0x0 )
Boot Mode 1 Boot Start Addr: 32256 ( 0x7E00 )
Boot Mode 1 Boot Reset Addr: 32256 ( 0x7E00 )

Boot Mode 2 Boot Size: 1024 bytes ( 0x400 )
Boot Mode 2 Pages: 8
Boot Mode 2 App Start Addr: 0 ( 0x0 )
Boot Mode 2 Boot Start Addr: 31744 ( 0x7C00 )
Boot Mode 2 Boot Reset Addr: 31744 ( 0x7C00 )

Boot Mode 3 Boot Size: 2048 bytes ( 0x800 )
Boot Mode 3 Pages: 16
Boot Mode 3 App Start Addr: 0 ( 0x0 )
Boot Mode 3 Boot Start Addr: 30720 ( 0x7800 )
Boot Mode 3 Boot Reset Addr: 30720 ( 0x7800 )

Boot Mode 4 Boot Size: 4096 bytes ( 0x1000 )
Boot Mode 4 Pages: 32
Boot Mode 4 App Start Addr: 0 ( 0x0 )
Boot Mode 4 Boot Start Addr: 28672 ( 0x7000 )
Boot Mode 4 Boot Reset Addr: 28672 ( 0x7000 )

just keep an eye on your build size and compare it with this

Original comment by frank.zhao.main@gmail.com on 18 Oct 2009 at 11:35

GoogleCodeExporter commented 9 years ago
file templates are implemented, now you can change the file creation template 
however
you want, i added macros that allow you to insert file name (with or without
extension), file extension, project name, formated date and time, also include 
other
templates so you can write a default copyright if you need to. i will add a 
wiki page
to help you use this feature

Original comment by frank.zhao.main@gmail.com on 19 Oct 2009 at 4:43

GoogleCodeExporter commented 9 years ago
the boot addresses are word addresses, so multiply them by 2 to get the code 
size
limit, i'll probably add something later to calculate that

Original comment by frank.zhao.main@gmail.com on 19 Oct 2009 at 2:07

GoogleCodeExporter commented 9 years ago
"i'll play around with the autohiding panel, in my experiance, they are shown 
briefly
before hiding, which isn't much of an issue"

Auto-hide works ok, but bottom screen control expand/close multiple times 
during 
startup (before the "choose project" dialog appears). Perhaps you can leave the 
control invisible until all elements are added/created.

"the templates with the -F option are for Arduino only, it is required as the 
Arduino
bootloader does not support device ID"

Device ID's are supported by the current Arduino bootloader, but I'm not sure 
about 
history here.

Any possibility to customize (change) the highlight color to something more 
readable 
when displaying the Find dialog?

What about suppressing line numbers in the editor?

I've noticed the new menu item to start avrdude in interactive mode. It appears 
however that you do not include the port override (part, programmer, port and 
speed 
needed).

Original comment by bflaglie@c2i.net on 21 Oct 2009 at 6:36

GoogleCodeExporter commented 9 years ago
i don't think i have a solution for the auto-hide problem

i'll get rid of the -F option, but existing users would have to manually edit 
the
file, or delete the file. that change to the bootloader is news to me

i can add a few more options for the editor settings, one to hide the line 
numbers,
but i'd really really rather not have to add a status bar to indicate your 
current
line number

i don't see a way to change the find result highlighting, sorry

i'll fix the interactive mode thing about the port overrides, missed that bit of
detail, i added it just because i haven't used that mode before and just wanted 
to
test it out.

Original comment by frank.zhao.main@gmail.com on 21 Oct 2009 at 1:07

GoogleCodeExporter commented 9 years ago
Just a little comment here I noticed under configure project then memory tab 
the address size is only 4 digits of hex....what if we have one of the 
supported (1284P) parts but want to put the .text section at I don't 
know....lets say 0x1f800
since there are only 4 digits of input, I have to export a makefile and replace 
the line:
LDFLAGS += -Wl,-section-start=.text=0x1F80
with the correct information:
LDFLAGS += -Wl,-section-start=.text=0x1F800
it's pretty easy to change the character limit in this editor field to allow 
>64k addresses isn't it?
Thanks (also submitting a bug, but thought it might be useful in this context 
as well

Kiwsa

Original comment by theKI...@gmail.com on 12 May 2012 at 1:48