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

AVR constants in Flash

Expand Messages
  • Paul
    Hi, Have been tinkering with your avr version of Nuttx and have been working with a template thing that puts constants and whatnot into flash if possible. Just
    Message 1 of 4 , Sep 4, 2011
    • 0 Attachment
      Hi,

      Have been tinkering with your avr version of Nuttx and have been working
      with a template thing that puts constants and whatnot into flash if
      possible. Just wondering if you have been working on this in some
      fashion too. Since Nuttx is in C++, I assume templates are ok?

      Paul
    • Gregory N
      Hi, Paul ... Sounds interesting. NuttX is in C, but that should be okay right? I don t know exactly what you are planning.. are you planning on
      Message 2 of 4 , Sep 4, 2011
      • 0 Attachment
        Hi, Paul

        > Have been tinkering with your avr version of Nuttx and have been working
        > with a template thing that puts constants and whatnot into flash if
        > possible. Just wondering if you have been working on this in some
        > fashion too. Since Nuttx is in C++, I assume templates are ok?

        Sounds interesting. NuttX is in C, but that should be okay right? I don't know exactly what you are planning.. are you planning on pre-processing C files in some fashion to move constant data to FLASH?

        Getting the data into FLASH is one issue; the other is accessing it from FLASH. The biggest issue for me was printf and all of the printf strings in RAM. Getting those into FLASH would really make the NuttX console-based examples and lot easier to detail with.

        Of course, I don't think that lowers the value of NuttX on the AVR platforms -- they are probably not the best choice for console based applications anyway.

        Greg
      • clemens fischer
        On Sun-2011/09/04-18:46 Gregory N wrote in gmane.comp.embedded.nuttx ... Isn t this what the SECTIONS {...} linker ( info ld on linux-like cross dev
        Message 3 of 4 , Oct 2, 2011
        • 0 Attachment
          On Sun-2011/09/04-18:46 Gregory N wrote in gmane.comp.embedded.nuttx
          (MID <j40a0s+2beg@...>):

          > Sounds interesting. NuttX is in C, but that should be okay right?
          > I don't know exactly what you are planning.. are you planning on
          > pre-processing C files in some fashion to move constant data to FLASH?
          >
          > Getting the data into FLASH is one issue; the other is accessing it
          > from FLASH. The biggest issue for me was printf and all of the printf
          > strings in RAM. Getting those into FLASH would really make the NuttX
          > console-based examples and lot easier to detail with.

          Isn't this what the "SECTIONS {...}" linker ("info ld" on linux-like
          cross dev environemnts) scripts are for? They put any block of code or
          data, whether initialized or not, into any conceivable memory location.

          Of course after running the linker the program "objcopy" would be needed
          to make an image that can be pushed to the device.

          Do the AVR micros have trouble with accessing data in flash?


          clemens
        • Gregory N
          ... Developing an AVR-specific OS is not a problem. I think the real difficulty is when you support an MCU-independent OS that runs on a variety of MCUs. Then
          Message 4 of 4 , Oct 2, 2011
          • 0 Attachment
            > Isn't this what the "SECTIONS {...}" linker ("info ld" on linux-like
            > cross dev environemnts) scripts are for? They put any block of code or
            > data, whether initialized or not, into any conceivable memory location.

            Developing an AVR-specific OS is not a problem. I think the real difficulty is when you support an MCU-independent OS that runs on a variety of MCUs. Then such MCU-specific customizations become an issue.

            > Do the AVR micros have trouble with accessing data in flash?

            Yes.. Since the AVRs have a Harvard architecture, data in FLASH must be accessed in a special way since it is not in the same "address space" as SRAM.

            Greg
          Your message has been successfully submitted and would be delivered to recipients shortly.