On 10/24/2013 11:12 AM, Matthias Trute wrote:
> Michael,
>
> > Looking at the core/devices/atmega328p directory (for the Uno) I
> > see three 'device.*' files and the atmega328p.frt file, which all
> > have the notation "generated automatically, do not edit".   In each
> > of those I note references to the TW* declarations desired for my
> > Uno.
>
> These are no references but the reference itself. e.g. in the file
> atmega328p.frt contains lines like
>
>  \ TWI
>  &189 constant TWAMR    \ TWI (Slave) Address Mask Register
>   $FE constant TWAMR_TWAM \
>  &184 constant TWBR    \ TWI Bit Rate register
>  &188 constant TWCR    \ TWI Control Register
>   $80 constant TWCR_TWINT \ TWI Interrupt Flag
>   $40 constant TWCR_TWEA \ TWI Enable Acknowledge Bit
>
> These are the *definitions* of the constants for later use. The
> WANT_TWI option includes the file device.inc at compile time and
Where, exactly, is the WANT_TWI option supposed to be set?  In the
project file?  I've tried this, but don't see the above constants
appearing in the dictionary of the flashed Uno.
> does basically the same: provide the definitions for further
> reference. The amforth-shell reads the py file for exactly the
> same purpose, but a little bit smarter. The amforth-shell can
> replace the TWBR string with its numeric value at runtime...
I will have a look at the amforth-shell.  Thanks!
>
> > If I shouldn't be editing these files, I'm unclear what actions I'm
> > to take to get them properly modified.
>
> There is no need to re-define the numbers. If you do so, you basically
> end up with a situation like
>
> : pi 4 ;
>
> or worse:
>
> : -1 0 ;
>
> Never do so.
I fully understand the unnecessary re-definition of numbers and the
problems it creates.  Let me re-phrase my question in this regards:
Taking the 'device.asm' file as an example ... my copy shows a line
".set WANT_TWI = 0".  If TWI is to be set  = 1 (which is what I'm
after), what action on my part makes that happen (aside from the
amforth-shell method)?

It's becoming clearer to me that I don't quite have a grasp on the
overall development cycle needed to get specific functions incorporated
into a hex file.  Is this explained somewhere such that a layperson,
like myself, can understand it?
 
>
> > My understanding is that the only place I should be modifying
> > anything is in the master project asm file.  If this is the case,
> > then it appears to be significant as to specifically where an
> > addition (a WANT option, for instance) is to be inserted.
>
> WANT options are part of the template.asm or however you name
> your master project assembler file...
AH ... so my original comment being that the WANT options are inserted
in the master project asm file, appears to be correct?  At what point
should the WANT options be placed in said file?
> If you decide to use the
> amforth-shell, you dont need the WANT-Options any longer.
>
>
> Matthias
>
>
>
>
------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the
most from
> the latest Intel processors and coprocessors. See abstracts and register >
>
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> _______________________________________________
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to