Abzac / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 0 forks source link

Fix mbed name conflict, remove patch #118

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The mbed platform uses a patch to re-order #include statements.  This was done 
to avoid a strange compiler error.

Michael (xinx) reported on 2010/08/03 on the maillist::

The NXP CMSIS header file (Cortex M3, LPC1700CMSIS/Core/CM3/
CoreSupport/core_cm3.h) contains the following declaration:

typedef struct
{
 __IO uint32_t ISER[8];                      /*!< Offset: 0x000
Interrupt Set Enable Register           */
      uint32_t RESERVED0[24];
 __IO uint32_t ICER[8];                      /*!< Offset: 0x080
Interrupt Clear Enable Register         */
      uint32_t RSERVED1[24];
 __IO uint32_t ISPR[8];                      /*!< Offset: 0x100
Interrupt Set Pending Register          */
      uint32_t RESERVED2[24];
 __IO uint32_t ICPR[8];                      /*!< Offset: 0x180
Interrupt Clear Pending Register        */
      uint32_t RESERVED3[24];
 __IO uint32_t IABR[8];                      /*!< Offset: 0x200
Interrupt Active bit Register           */
      uint32_t RESERVED4[56];
 __IO uint8_t  IP[240];                      /*!< Offset: 0x300
Interrupt Priority Register (8Bit wide) */
      uint32_t RESERVED5[644];
 __O  uint32_t STIR;                         /*!< Offset: 0xE00
Software Trigger Interrupt Register     */
}  NVIC_Type;

whereas pymit/src/vm/interp.h defines

#define IP              (FP->fo_ip)

which results in strange but valid errors during compilation. This is the whole 
story, I suppose.

Original issue reported on code.google.com by dwhall...@gmail.com on 5 Aug 2010 at 2:04

GoogleCodeExporter commented 9 years ago
r565
- Prepended PM_ to SP, IP and FP macros in interp.h
- Removed mbed's patch file which re-ordered the #include statements
- Removed main_nat.patch from mbed/ directory

There is no way to make a regression test for this issue.
The only way to test is to build for the mbed platform.
After changes, tests pass, result builds on mbed on-line compiler.
Mainlined directly.

Original comment by dwhall...@gmail.com on 5 Aug 2010 at 8:36