Commit Graph

48 Commits

Author SHA1 Message Date
florian
a589637b1d * patch by Christo Crause: more avr1 controllers and remove attiny28 from avr25 makefile list, resolves #36686
git-svn-id: trunk@44136 -
(cherry picked from commit 297d6e2c60)

# Conflicts:
#	.gitattributes
2021-10-24 12:40:37 +02:00
florian
b77b0df3bd * AVR: attiny28 is an avr1 CPU
git-svn-id: trunk@44132 -
(cherry picked from commit dea63e3d61)
2021-10-24 12:40:37 +02:00
florian
3cb2cff444 * patch by Christo Crause: more AVR controllers, resolves #36683
git-svn-id: trunk@44130 -
(cherry picked from commit 04ad607bb4)

# Conflicts:
#	.gitattributes
2021-10-24 12:40:37 +02:00
florian
a124adb9a7 * patch by Christo Crause: add missing atmega-PB controllers, resolves #36667
git-svn-id: trunk@44128 -
(cherry picked from commit 5040e31f11)

# Conflicts:
#	.gitattributes
2021-10-24 12:40:37 +02:00
florian
5e4de7277a * patch by Christo Craus to reorder the avr controllers for better overview, resolves #36662
git-svn-id: trunk@44124 -
(cherry picked from commit e033269deb)
2021-10-24 12:40:37 +02:00
florian
104cb227d4 * patch by Christo Crause: board aliases to onboard controllers, resolves #36659
git-svn-id: trunk@44111 -
(cherry picked from commit 4fe21a8e1a)
2021-10-24 12:40:37 +02:00
florian
dd2212e1f7 * based on a patch by Christo Crause: more compiler fixes for avrtiny, resolves #36646
git-svn-id: trunk@44103 -
(cherry picked from commit 36058ca4d4)
2021-10-24 12:40:37 +02:00
florian
61c6c04f71 + patch by Christo Crause: Support for attiny10x controllers, resolves #36645
git-svn-id: trunk@44081 -
(cherry picked from commit 00214406bc)

# Conflicts:
#	.gitattributes
2021-10-24 12:40:37 +02:00
florian
0dc7bfde42 * patch by Christo Crause: support for megaAVR 0 and tinyAVR 0/1, #36616, part 1/3
git-svn-id: trunk@44036 -
(cherry picked from commit 670c61e760)
2021-10-24 12:40:37 +02:00
florian
4f5b872098 * patch by Christo Crause: avrtiny26 controller is not subarch avr25 but avr2, resolves #36620
git-svn-id: trunk@44021 -
(cherry picked from commit d2a059bd02)
2021-10-24 12:40:37 +02:00
florian
0a66f8f1dd * patch by Christo Crause: Correct subarch for avrtiny series in compiler, resolves #36619
git-svn-id: trunk@44020 -
(cherry picked from commit 3ab8830b83)
2021-10-24 12:40:37 +02:00
florian
cda78c398f + AVR: cputype cpu_avrtiny
git-svn-id: trunk@43984 -
(cherry picked from commit aaa6ae5770)
2021-10-24 12:40:37 +02:00
Jeppe Johansen
f1a9930550 avr: Fixed some inconsistencies.
git-svn-id: trunk@42204 -
(cherry picked from commit 0d97dc7965)
2021-10-24 12:40:36 +02:00
pierre
1f20cfe991 Merge of several commits related to enhancements in PPU writing
and more precisely to cross reading/writing fixes.

------------------------------------------------------------------------
r41896 | pierre | 2019-04-18 14:08:03 +0000 (Thu, 18 Apr 2019) | 15 lines

  Integrate patch from bug report 35409.
  Add possibiliy to throw InternalError
  for unhandled case values inside tentryfile,
  But avoid adding dependency on verbose unit
  as this would break ppudump handling of ppu files.

  Add RaiseAssertion virtual method to tentryfile class.
  Call RaiseAssertion in tentryfile methods
  where an internal error is wanted.
  Override RaiseAssertion method in symtype.pas unit
  to call InternalError.
  Add new class tppudumpfile to override RaiseAssertion
  in utils/ppuutils/ppudump.pp unit.


------------------------------------------------------------------------
--- Merging r41896 into '.':
U    compiler/entfile.pas
U    compiler/pcp.pas
U    compiler/symtype.pas
U    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r41896 into '.':
 U   .
------------------------------------------------------------------------
r42111 | pierre | 2019-05-20 22:06:57 +0000 (Mon, 20 May 2019) | 1 line

 List TSettings partially and improve generic output
------------------------------------------------------------------------
--- Merging r42111 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42111 into '.':
 G   .
------------------------------------------------------------------------
r42322 | pierre | 2019-07-03 13:35:05 +0000 (Wed, 03 Jul 2019) | 1 line

 Systematically include fpcdefs.inc at sart of all units used by compiler
------------------------------------------------------------------------
--- Merging r42322 into '.':
U    compiler/aarch64/cpuinfo.pas
U    compiler/arm/cpuinfo.pas
U    compiler/avr/cpuinfo.pas
U    compiler/ccharset.pas
U    compiler/generic/cpuinfo.pas
U    compiler/jvm/cpuinfo.pas
U    compiler/m68k/cpuinfo.pas
U    compiler/macho.pas
U    compiler/machoutils.pas
U    compiler/mips/cpuinfo.pas
G    compiler/pcp.pas
U    compiler/powerpc/cpuinfo.pas
U    compiler/powerpc64/cpuinfo.pas
U    compiler/systems/i_wii.pas
--- Recording mergeinfo for merge of r42322 into '.':
 G   .

------------------------------------------------------------------------
r42323 | pierre | 2019-07-04 15:24:49 +0000 (Thu, 04 Jul 2019) | 7 lines

  * Set ControllerSupport to false for sparc/sparc64 and x86_64 CPUs.
    This boolean must only be set to true if TControllerType is not simply (ct_none)
  * ppu.pas: Increment CurrentPPULongVersion constant as the above modification
    changes the number of fields of the TSettings record that is saved to
    PPU in ST_LOADSETTINGS field. { not mereged }


------------------------------------------------------------------------
--- Merging r42323 into '.':
C    compiler/ppu.pas { not mereged }
U    compiler/sparc/cpuinfo.pas
U    compiler/sparc64/cpuinfo.pas
U    compiler/x86_64/cpuinfo.pas
--- Recording mergeinfo for merge of r42323 into '.':
 G   .

------------------------------------------------------------------------
r42324 | pierre | 2019-07-04 15:25:40 +0000 (Thu, 04 Jul 2019) | 1 line

 Correctly read saved tsettings
------------------------------------------------------------------------
--- Merging r42324 into '.':
C    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42324 into '.':
 G   .
Summary of conflicts:
  Text conflicts: 1
------------------------------------------------------------------------
r42325 | marcus | 2019-07-04 16:49:26 +0000 (Thu, 04 Jul 2019) | 1 line

Fixed ppudump compilation on big endian platforms after r42324
------------------------------------------------------------------------
--- Merging r42325 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42325 into '.':
 G   .
------------------------------------------------------------------------
r42353 | svenbarth | 2019-07-12 16:25:33 +0000 (Fri, 12 Jul 2019) | 1 line

* write an entry name for the property options
------------------------------------------------------------------------
--- Merging r42353 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42353 into '.':
 G   .
------------------------------------------------------------------------
r42354 | svenbarth | 2019-07-12 16:25:36 +0000 (Fri, 12 Jul 2019) | 1 line

* write a name for the none property access entry (looks nicer than a "(Nil)" at the start of the line)
------------------------------------------------------------------------
--- Merging r42354 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42354 into '.':
 G   .
------------------------------------------------------------------------
r42527 | pierre | 2019-07-29 05:33:00 +0000 (Mon, 29 Jul 2019) | 22 lines

  Fix recordtoken writing into ppu files to allow correct
  handling in cross-configuration with different endianess.

  The code has been modified to use the same scheme as the writing of
  the other parts of the ppu, i.e. change_endian filed has been
  added also to tscannerfile class of scanner unit.
  This field is then used to swap values that required endianess
  conversion.

  * scanner.pas: change_endian filed added to tscannerfile class.
    The value of this field is set as the same field in tentryfile class of entfile unit.
    Token read and write methods converted to use change_endian field.

  * ppu.pas: Increase CurrentPPILongVersion

  * utils/ppuutils/ppudump.pp: Remove unneeded FPC_BIG_ENDIAN code
    which was needed because tokens were previously written using a
    different rule.




------------------------------------------------------------------------
--- Merging r42527 into '.':
C    compiler/ppu.pas
U    compiler/scanner.pas
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42527 into '.':
 G   .
Summary of conflicts:
  Text conflicts: 1
------------------------------------------------------------------------
r42528 | pierre | 2019-07-29 11:54:27 +0000 (Mon, 29 Jul 2019) | 1 line
Changed paths:
   M /trunk/compiler/scanner.pas

Try to fix bug introduced in previous commit #42527, hopefully fixing bug report 35902
------------------------------------------------------------------------

--- Merging r42528 into '.':
G    compiler/scanner.pas
--- Recording mergeinfo for merge of r42528 into '.':
 G   .------------------------------------------------------------------------
r42530 | pierre | 2019-07-29 16:40:58 +0000 (Mon, 29 Jul 2019) | 8 lines

   Try to fix ppudump for generic/inline.

   * entfile.pas: Differenciate ibsymtableoptions and ibrecsymtableoptions.
   * ppu.pas: Increase ppu unit CurrentPPULongVersion value.
   * utils/ppuutils/ppudump.pp: Add current_symtable_options variable.
     Change readsymtableoptions from procedure to function returning
     the new tsymtableoptions.

------------------------------------------------------------------------
--- Merging r42530 into '.':
G    compiler/entfile.pas
G    compiler/ppu.pas
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42530 into '.':
 G   .
------------------------------------------------------------------------
r42583 | pierre | 2019-08-05 09:15:12 +0000 (Mon, 05 Aug 2019) | 1 line

 Reorganize token buffer output to be able to use it for generics and inlined functions
------------------------------------------------------------------------
--- Merging r42583 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42583 into '.':
 G   .
------------------------------------------------------------------------
r42591 | pierre | 2019-08-06 06:32:52 +0000 (Tue, 06 Aug 2019) | 1 line

 Add mode and optimizer switches names, and check that no unknown switch is set
------------------------------------------------------------------------
--- Merging r42591 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42591 into '.':
 G   .
------------------------------------------------------------------------
r42596 | pierre | 2019-08-06 21:32:51 +0000 (Tue, 06 Aug 2019) | 1 line

 Fix gettokenbufshortint, as shortint is one byte long, not two
------------------------------------------------------------------------
--- Merging r42596 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42596 into '.':
 G   .
------------------------------------------------------------------------
r42609 | pierre | 2019-08-09 09:29:50 +0000 (Fri, 09 Aug 2019) | 1 line

 Correct size of asizeint, which is still 4-byte long even when CpuAddrBitSize is 16 as for avr and i8086
------------------------------------------------------------------------
--- Merging r42609 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42609 into '.':
 G   .
------------------------------------------------------------------------
r42670 | pierre | 2019-08-13 06:20:23 +0000 (Tue, 13 Aug 2019) | 1 line

 Reduce cpu-os dependency on real constant printout by using system.str
------------------------------------------------------------------------
--- Merging r42670 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42670 into '.':
 G   .
------------------------------------------------------------------------
r42906 | pierre | 2019-09-02 16:00:15 +0000 (Mon, 02 Sep 2019) | 1 line

 Fix problems with big endian systems without 80-bit floating point support
------------------------------------------------------------------------
--- Merging r42906 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42906 into '.':
 G   .

git-svn-id: branches/fixes_3_2@43387 -
2019-11-04 08:50:42 +00:00
florian
055a49b202 * patch by Christo Crause: the subarch type for atmega 8, 8A, 16 & 32 was incorrect. Atmega8A was also listed under the wrong subarch type in the makefile, also fixed.
* atmega8a needs to use rjmp now

git-svn-id: trunk@38282 -
2018-02-18 10:54:59 +00:00
Jeppe Johansen
4a169e6b1a Changed subarch of at90pwm161
git-svn-id: trunk@37858 -
2017-12-29 11:30:35 +00:00
florian
73c46a5988 - removed unused constants
git-svn-id: trunk@35664 -
2017-03-26 13:06:34 +00:00
florian
56b6cedcf4 * increase ram size of the avrsim controller target
git-svn-id: trunk@33066 -
2016-02-07 11:17:55 +00:00
florian
bd20c5a66b * set a proper sram base for the avrsim controller type
git-svn-id: trunk@32647 -
2015-12-12 22:37:41 +00:00
Jeppe Johansen
3cb9be73bc Moved tcontrollerdatatype out into cpuinfo.
Added cputype and fputype info to tcontrollerdatatype arrays.

git-svn-id: trunk@31574 -
2015-09-07 20:36:54 +00:00
Jeppe Johansen
55669f62b1 Added most AVR controllers.
Made absolutevarsym use PUint instead of AWord for its offset to fix range errors.

git-svn-id: trunk@31242 -
2015-07-29 21:01:21 +00:00
florian
c0dd2047f9 * cosmetics, entries are now properly aligned
git-svn-id: trunk@31039 -
2015-06-13 16:55:36 +00:00
Jeppe Johansen
ab9c8bb569 Fixed startup assembler code for the case where there's no data in .bss and/or in .data.
Fixed _stack_top symbol calculation so it works for all controllers.
Added ATTINY2313 controller.

git-svn-id: trunk@31031 -
2015-06-13 12:30:50 +00:00
florian
a3553a7320 + adds missing ct_atmega168 and ct_atmega368 symbols, thanks to mischi
git-svn-id: trunk@30960 -
2015-05-31 17:59:39 +00:00
florian
cf552b2a0b + ATmeag168/ATmeag368 support
git-svn-id: trunk@30938 -
2015-05-30 18:01:14 +00:00
florian
0cd521fc8b + ATmega48/ATmega88 support
git-svn-id: trunk@30937 -
2015-05-30 17:55:49 +00:00
florian
d58d7b7838 * fixes breakage of r30930 (+ ATtiny24/ATtiny44/ATtiny84 support)
git-svn-id: trunk@30932 -
2015-05-28 21:15:00 +00:00
florian
0f73675354 + ATtiny24/ATtiny44/ATtiny84 support
git-svn-id: trunk@30930 -
2015-05-28 21:10:39 +00:00
florian
f5edf77a05 + Atmega8 support
git-svn-id: trunk@30768 -
2015-05-02 18:18:00 +00:00
florian
dfd4d3656b + avrsim controller target requiring a special avr simulator with a certain memory location handling, see avrsim.pp controller helper unit for what it is needed
git-svn-id: trunk@30385 -
2015-03-29 21:13:36 +00:00
florian
5c67fcc43f + change always floating point divisions into multiplications if they are a power of two,
this is an exact operation so it is always allowed
* change only divisions by normal numbers into multiplications

git-svn-id: trunk@29085 -
2014-11-16 20:47:38 +00:00
Tomas Hajny
3ee3542744 * boolean constant instead of IFDEFs for detection of microcontroller support
git-svn-id: trunk@29052 -
2014-11-10 12:34:59 +00:00
florian
b2b26f84cf * partially merged the mips-embedded branch of Michael Ring:
- startup code/controller units are not merged yet
  - assembler call does not pass the needed CPU type yet

git-svn-id: trunk@27188 -
2014-03-19 21:25:38 +00:00
Jeppe Johansen
2227045e23 Replace forbidden chars in more places in the GAS assembler writer.
Add support for .set and .weak on AVR.
Fix 64 bit negation on AVR.
Add cpu_capabilities to cpuinfo.pas and fixed some peephole optimizations.
Pass >4 byte parameters by reference.

git-svn-id: trunk@26943 -
2014-03-04 08:01:23 +00:00
Jeppe Johansen
8b17a358e4 Remove all traces of the interrupt vector table generation mechanism
Clean up cpuinfo tables
Fixed ARMv7M bug(BLX <label> doesn't exist on that version)

git-svn-id: branches/laksen/arm-embedded@22579 -
2012-10-08 00:10:52 +00:00
florian
895aa0d752 * reworked cpuflags for avr
+ define cpuflags in options unit so user programs can access them

git-svn-id: trunk@22089 -
2012-08-15 15:48:59 +00:00
florian
aadf6da14f * better naming of CPU flag strings
git-svn-id: trunk@22055 -
2012-08-09 20:32:18 +00:00
florian
4d86d25c6c * -O4 switch for optimizations which are correct but which might have unexpected effects
like field reordering (possible problems cracker classes) or using ebp as normal register (broken
      stack traces from dump_stack)
    + niln is also valid in a cse domain
    * parameters passed by reference shall have a complexity >1
    * load nodes from outer scopes shall have a complexity >1
    * better cse debugging
    + more node types added to cse
    * consider parameters passed by reference in cse
    * take care of cse in parameters in simple cases

git-svn-id: trunk@22050 -
2012-08-09 18:58:54 +00:00
florian
b330bba0bc + introduce -Oofastmath
* limit the application of the tree transformation introduced in r21986 to safe cases and -Oofastmath

git-svn-id: trunk@22040 -
2012-08-08 19:35:45 +00:00
Jonas Maebe
3798b79fd7 + optimization that (re)orders instance fields of Delphi-style classes in
order to minimise memory losses due to alignment padding. Not yet enabled
    by default at any optimization level, but can be (de)activated separately
    via -Oo(no)orderfields
   o added separate tdef.structalignment method that returns the alignment
     of a type when it appears in a record/object/class (factors out
     AIX-specific double alignment in structs)
   o changed the handling of the offset of a delegate interface
     implemented via a field, by taking the field offset on demand
     rather than at declaration time (because the ordering optimization
     causes the offsets of fields to be unknown until the entire
     declaration has been parsed)

git-svn-id: trunk@21947 -
2012-07-22 16:47:19 +00:00
florian
a08dfdf803 o slightly modified patch by John Clymer:
* converts the embedded information into controller specific records (arm and avr)
  * new cpu-specific units for several Stellaris (Fury and Tempest class) targets, 
  + STM32F103RB
  - old Stellaris unit has been removed

git-svn-id: trunk@18848 -
2011-08-25 21:46:26 +00:00
florian
04e2321724 * avr cpuflags renames
+ cpuflagsstr

git-svn-id: trunk@18007 -
2011-07-17 08:55:16 +00:00
florian
a178f34ab3 + avr processor type information
git-svn-id: branches/avr@17051 -
2011-02-27 21:13:07 +00:00
florian
5acf377e31 * enable node cse for all cpus as level 2 optimization
git-svn-id: trunk@14703 -
2010-01-17 12:28:28 +00:00
florian
60169d34dc * fixed compilation of AVR compiler
git-svn-id: trunk@13342 -
2009-06-27 19:31:24 +00:00
florian
48fb130be3 * fixed fpu type setting for avr
git-svn-id: trunk@10463 -
2008-03-08 17:09:40 +00:00
florian
c05d4912f4 + basic system unit for avr-embedded
* fixed several compiler stuff to be able to start system unit compilation on avr

git-svn-id: trunk@10318 -
2008-02-13 20:35:16 +00:00
florian
bc73f9021c Merged revisions 5891-10167,10169-10180 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/avr

........
  r5891 | florian | 2007-01-11 17:30:12 +0100 (Do, 11 Jan 2007) | 2 lines
  
  + some initial work
........
  r10170 | florian | 2008-02-03 11:02:04 +0100 (So, 03 Feb 2008) | 2 lines
  
  * continued to work on avr port
........
  r10180 | florian | 2008-02-03 15:29:30 +0100 (So, 03 Feb 2008) | 2 lines
  
  + a lot of skeleton code for avr added
........

git-svn-id: trunk@10186 -
2008-02-03 17:21:52 +00:00