Loading ...
Sorry, an error occurred while loading the content.

78Re: TI Development Kits

Expand Messages
  • Sandy
    Apr 4, 2006
      You could go pretty far with the preprocessor, but the name for some
      constants are the same but have different bit mask values (still
      could be done with a bit of a tweek to the constant name to fix),
      then a few instructions have some odd rules about the encoding. The
      other problem is that some (one or more) of the values for an
      instruction are optional, as well of these are calculated based on
      the current instruction counter. Not a big deal as I guess you could
      require all parameters to be specified, and no defaults.

      No a big deal for the most part as the HETA is free in the download
      section. I'm sure it has some bugs, but it's easy to fix. I'll do
      the port to linux/gcc which should be trivial when I get some more
      slack time.

      Sandy

      --- In TMS470_ARM@yahoogroups.com, Michael Johnson <mpj@...> wrote:
      >
      > Could the preprocessor be used for this? Not as pretty as a
      dedicated
      > assembler but portable and a simple/unavoidable build process.
      >
      > The example on page 33 of spnu199d.pdf could look like
      >
      > #include <hetdefs.h>
      >
      > #define CN 0
      > #define EA 1
      > #define MA 2
      > #define EB 3
      > #define MB 4
      >
      > const unsigned hetprogram[] =
      > {
      >
      > CNT(BRK_OFF, EA, ANGLE_COUNT_OFF, REG_A, IRQ_OFF, CONTROL_OFF,
      MAXC, 0)
      >
      > ECMP(BRK_OFF, EB, HR_LR_HIGH, ANGLE_COMP_OFF, CONTROL_OFF,
      > EN_PIN_ACTION_ON, \
      > MA, PIN_A, PULSEL0, REG_A, IRQ_OFF, 17, 19)
      >
      > MOV32(BRK_OFF, EB, EA, CONTROL_OFF, INIT_OFF, IMTOREG_AND_REM,
      > REG_NONE, 17, 19)
      >
      > ECMP(BRK_OFF, CN, HR_LR_HIGH, ANGLE_COMP_OFF, CONTROL_OFF,
      > EN_PIN_ACTION_ON, \
      > MB, PIN_B, ACTION_PULSE0, REG_A, IRQ_OFF, 5, 13)
      >
      > MOV32(BRK_OFF, CN, EB, CONTROL_OFF, INIT_OFF, IMTOREG_AND_REM,
      > REG_NONE, 5, 13)
      >
      > };
      >
      > I don't like all the upper case but it's not too bad. I can't see
      why
      > implementing these macros would be difficult, but I haven't done
      it.
      >
      > Alternatively you could use regular C functions and then you could
      > dynamically create HET programs.
      >
      > Regards
      > Michael
      [snip]
    • Show all 14 messages in this topic