Jump to content
43oh

Rickta59

Members
  • Content Count

    1,135
  • Joined

  • Last visited

  • Days Won

    71

Reputation Activity

  1. Like
    Rickta59 got a reaction from abecedarian in How accurate is Millis()?   
    Why don't you just use the DS3232 as the TimerA clock source?
  2. Like
    Rickta59 got a reaction from spirilis in How accurate is Millis()?   
    Why don't you just use the DS3232 as the TimerA clock source?
  3. Like
    Rickta59 reacted to spirilis in Windows 10   
    What kind of errors?  I have Windows 10 Professional (laptop came with it preinstalled though) and no problems, but I will note I made sure to install all the TI drivers in signature-ignore mode (i.e. hold Shift while clicking the Restart menu option under Start>Power, select reboot to options menu, select option 7 after the reboot for booting with no driver signature verification, then install drivers in that special mode).  I did the same thing when I installed CCSv6 too.
  4. Like
    Rickta59 got a reaction from NurseBob in Seeking advice - MSP430F5529 C/C++ vs Energia   
    The most glaring problem with using Energia with an msp430f5529 is that it uses msp430-gcc version 4.6.3.  That version of gcc doesn't really allow you to take full advantage of the larger flash size.  You are limited to using the flash memory in the address range less than 64k (16 bit mode).  For the msp430f5529 that means you only get access to 48000 bytes of the 128k of flash available.  If you use CCS you can use 20bit compiler mode and access all the flash.
     
    -rick
     
    See my issue about another board. The problem is also applicable to the msp430f5529:
     
    https://github.com/energia/Energia/issues/806
  5. Like
    Rickta59 got a reaction from Fmilburn in Seeking advice - MSP430F5529 C/C++ vs Energia   
    The most glaring problem with using Energia with an msp430f5529 is that it uses msp430-gcc version 4.6.3.  That version of gcc doesn't really allow you to take full advantage of the larger flash size.  You are limited to using the flash memory in the address range less than 64k (16 bit mode).  For the msp430f5529 that means you only get access to 48000 bytes of the 128k of flash available.  If you use CCS you can use 20bit compiler mode and access all the flash.
     
    -rick
     
    See my issue about another board. The problem is also applicable to the msp430f5529:
     
    https://github.com/energia/Energia/issues/806
  6. Like
    Rickta59 got a reaction from veryalive in Program won't fit weirdness   
    cdecl.org is your friend here:
    http://cdecl.ridiculousfish.com/?q=const+char+*+const+command%5B%5D
  7. Like
    Rickta59 got a reaction from tripwire in Program won't fit weirdness   
    cdecl.org is your friend here:
    http://cdecl.ridiculousfish.com/?q=const+char+*+const+command%5B%5D
  8. Like
    Rickta59 got a reaction from veryalive in Initializing flash segment from CCS compiler/linker ?   
    http://forum.43oh.com/topic/1220-saving-flash-space-by-making-use-of-infomem/?p=54004
  9. Like
    Rickta59 got a reaction from JasonP in Software Serial library use   
    The msp432 has up to 4 hardware UARTS, I don't know what Energia supports.  Do you really need SoftwareSerial?
  10. Like
    Rickta59 got a reaction from JasonP in Software Serial library use   
    Seems like it supports at least Serial and Serial1. This compiles:
    /* Multple serial test Receives from the main serial port, sends to the others. Receives from serial port 1, sends to the main serial (Serial 0). The circuit: * Any serial device attached to Serial port 1 * Serial monitor open on Serial port 0: created 30 Dec. 2008 by Tom Igoe This example code is in the public domain. */   void setup() { // initialize both serial ports: Serial.begin(9600); Serial1.begin(9600); } void loop() { // read from port 1, send to port 0: if (Serial1.available()) { int inByte = Serial1.read(); Serial.write(inByte); } }
  11. Like
    Rickta59 got a reaction from JasonP in Software Serial library use   
    It looks like all that stuff is now hidden in a binary blob that doesn't come with source code.
    $ arm-none-eabi-nm -C hardware/emt/ti/runtime/wiring/msp432/lib/wiring_msp432.m4fg.lib | grep Serial HardwareSerial.om4fg: 00000000 t _GLOBAL__sub_I__ZN14HardwareSerialC2Ev 00000000 B Serial 00000000 B Serial1 00000000 T HardwareSerial::readCallback(UART_Config*, void*, unsigned int) 00000000 T HardwareSerial::end() 00000000 T HardwareSerial::init(unsigned long) 00000000 T HardwareSerial::peek() 00000000 T HardwareSerial::read() 00000000 T HardwareSerial::begin(unsigned long) 00000000 T HardwareSerial::flush() 00000000 T HardwareSerial::write(unsigned char) 00000000 T HardwareSerial::write(unsigned char const*, unsigned int) 00000000 T HardwareSerial::acquire() 00000000 T HardwareSerial::release() 00000000 T HardwareSerial::setPins(unsigned long) 00000000 T HardwareSerial::flushAll() 00000000 T HardwareSerial::available() 00000000 T HardwareSerial::setModule(unsigned long) 00000000 T HardwareSerial::HardwareSerial(unsigned long) 00000000 T HardwareSerial::HardwareSerial() 00000000 T HardwareSerial::HardwareSerial(unsigned long) 00000000 T HardwareSerial::HardwareSerial() 00000000 T HardwareSerial::operator bool() 00000000 R vtable for HardwareSerial It appears that only Serial and Serial1 are implemented.
     
    This is a question for @@energia
     
    -rick
  12. Like
    Rickta59 got a reaction from chicken in Program won't fit weirdness   
    cdecl.org is your friend here:
    http://cdecl.ridiculousfish.com/?q=const+char+*+const+command%5B%5D
  13. Like
    Rickta59 got a reaction from Fmilburn in Software Serial library use   
    It looks like all that stuff is now hidden in a binary blob that doesn't come with source code.
    $ arm-none-eabi-nm -C hardware/emt/ti/runtime/wiring/msp432/lib/wiring_msp432.m4fg.lib | grep Serial HardwareSerial.om4fg: 00000000 t _GLOBAL__sub_I__ZN14HardwareSerialC2Ev 00000000 B Serial 00000000 B Serial1 00000000 T HardwareSerial::readCallback(UART_Config*, void*, unsigned int) 00000000 T HardwareSerial::end() 00000000 T HardwareSerial::init(unsigned long) 00000000 T HardwareSerial::peek() 00000000 T HardwareSerial::read() 00000000 T HardwareSerial::begin(unsigned long) 00000000 T HardwareSerial::flush() 00000000 T HardwareSerial::write(unsigned char) 00000000 T HardwareSerial::write(unsigned char const*, unsigned int) 00000000 T HardwareSerial::acquire() 00000000 T HardwareSerial::release() 00000000 T HardwareSerial::setPins(unsigned long) 00000000 T HardwareSerial::flushAll() 00000000 T HardwareSerial::available() 00000000 T HardwareSerial::setModule(unsigned long) 00000000 T HardwareSerial::HardwareSerial(unsigned long) 00000000 T HardwareSerial::HardwareSerial() 00000000 T HardwareSerial::HardwareSerial(unsigned long) 00000000 T HardwareSerial::HardwareSerial() 00000000 T HardwareSerial::operator bool() 00000000 R vtable for HardwareSerial It appears that only Serial and Serial1 are implemented.
     
    This is a question for @@energia
     
    -rick
  14. Like
    Rickta59 got a reaction from ariesdenmark in Cant connect to MSP430 from MAC   
    I think this is still broken for the g2452 and g2231
     
    https://github.com/energia/Energia/issues/874
     
    http://forum.43oh.com/topic/9562-please-help-serial-port-issue/?p=72207
     
    -rick
  15. Like
    Rickta59 got a reaction from yyrkoon in msp430G2553 WDT   
    I modified the example to show what I meant.
  16. Like
    Rickta59 got a reaction from yyrkoon in msp430G2553 WDT   
    you need the __delay_cycle() to let the pins settle so they are quiet.  I wasn't doing anything to try and modify the timing.  I'm using:
    while (ADC10CTL1 & ADC10BUSY) {       // sleep and wait for completion       asm("nop"); } To wait for the adc sample to finish.  The better way to do it would be to have an ADC ISR wake up the chip. Just start the ADC capture and then sleep. Have the ISR do an LPM_EXIT.  When it comes out of sleep just read the sample.  Of course you would have to disable the TIMER while waiting for the ADC to finish.
  17. Like
    Rickta59 got a reaction from yyrkoon in msp430G2553 WDT   
    To be honest I don't think it is that useful anymore.  TI has little interest in the smaller chips.  Their approach is go big or go home. Their recent marketing approach seem to be, let us force feed TI-RTOS to everyone.  People using the smaller chips probably already have their favorite mode of coding.   I threw this code out there to show what is possible and also to give some context to how you arrived at your simple and small implementation. Fabooh has had little interest so it isn't worth documenting other than providing the example folder.  That is enough for people interested in trying some c++ templates code that is optimized for the msp430-gcc.  Most people really want full Arduino compatibility or they want to do their own thing in C.  I thought Zeke and others might find it interesting.  To build the examples you just type:
    $ git clone https://github.com/RickKimball/fabooh.git $ cd fabooh $ make clean all # at the top level directory I assume you are using linux and an msp430g2553 v1.5 launchpad. I don't try to build this stuff on windows. Although if you have the linux tools installed and msp430-gcc in your path it should work.
     
    If you want to use a specific example just change to that directory and type:
    $ cd fabooh/examples/serial/ascii_table $ make clean all install The easiest way to start your own new program is find an example you like and copy that directory to a new one with a new name
    $ cd fabooh/examples/serial $ cp -rv ascii_table my_app $ cd my_app $ mv ascii_table.cpp my_app.cpp $ sed -e 's/ascii_table/my_app/g' Makefile > makefile $ mv makefile Makefile $ make clean all install BTW: I don't disagree with your solution.  Your approach of hard coding it to do what you want is a perfectly reasonable approach.
    I was just responding to your comment that you didn't remember where to find the serial print stuff I wrote.
  18. Like
    Rickta59 got a reaction from veryalive in msp432 - run code from ram using arm-none-eabi-gcc in CCS   
    I noticed that if you use the TI arm compiler in CCS 6.x you can easily run code from ram.  Unfortunately, it doesn't seem like they have implemented that for the arm-none-eabi-gcc compiler. Attached is a zip file project you can import into CCS.  It is configured to run the msp432 at 48MHz using the high frequency crystal.   It is also configured to generate small code using the nano.specs newlib configuration.
     
    In the default linker script, the data segment uses all the available ram starting at the base address of 0x20000000.  The msp432 provides another bus address for SRAM at the base address of 0x01000000.  This alias address is used to provide single cycle access to code in ram. I modified the the linker script in this project (msp432p401r.lds) so that the first 512 bytes of ram are reserved for code. 
    /* adjust based address for fixed size of 512 bytes (0x200) for code in ram */ /* NOTE: if you change this size, make sure you adjust .vtable offset also */ SRAM_DATA  (RW) : ORIGIN = 0x20000000+0x200, LENGTH = 0x00010000-0x200 Additonally, a new section called .ramfunc is used to collect any code put into the ".ramfunc" section. You do this using the gcc specific _attribute__((section(".ramfunc"))) directive.  When the chip resets, code has been added to copy the instruction code from flash to ram.
    extern uint32_t __ramfunc_load__; extern uint32_t __ramfunc_start__; extern uint32_t __ramfunc_end__; void resetISR(void) {     /* Copy .ramfunc code and data segment initializers from flash to SRAM. */     volatile uint32_t *pui32Src, *pui32Dest;     pui32Src = &__ramfunc_load__;     for(pui32Dest = &__ramfunc_start__; pui32Dest < &__ramfunc_end__; )     {         *pui32Dest++ = *pui32Src++;     } ... Attachment blink_cmsis_gcc.zip:
    blink_cmsis_gcc.zip
     
    In CCS, go to Project Menu and select the "Import CCS Projects ..." and select the archive file button. Use the file dialog to select the location where you downloaded the attached blink_cmsis_gcc.zip file.
     
    BTW: This is using the new CMSIS headers.
     
    Running in the debugger (note the address 0x10000FC of the code in the disassembly window)

  19. Like
    Rickta59 reacted to terjeio in What are you doing right now..?   
    Making a stencil for my new Tiva based CO2 Laser controller, got the boards from China today. I have ported grbl to Tiva, I am going to integrate it into my own code so will make it into a library.
     
    Here is a video of the laser in action if you have nothing better to do:
     
    https://youtu.be/nkeuVN_bmTo
     
    Terje
  20. Like
    Rickta59 got a reaction from yyrkoon in msp430G2553 WDT   
    Last time I checked Energia repurposes the WDT for its own purposes.  * It has been a while though so who knows *
  21. Like
    Rickta59 got a reaction from tripwire in TI not supporting MSP-EXP430G2 on Mac or Linux?   
    They made the decision early on.  It seems at some point they actually told people instead of keeping it quiet. I guess they hadn't decided.  Back in 2012 it was a miracle to even have linux support.  At that time all they said was: "The LaunchPad is not supported on Linux at this time." To me the implication was they might in the future.
     
    https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/171173/688729#688729
     
    I can't find the thread where they finally said they would never support it but they did say it at one point.
     
    [edit] I found the post .. from 2015 [/edit]
    https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/171173/1712768#1712768
  22. Like
    Rickta59 got a reaction from yyrkoon in msp430( Launchpad v1.5 ) compiler   
    The compiler that comes with Energia right now msp430-gcc (version 4.6.3) has a fairly small libc. Unfortunately, copyright issues prevent it from ever being upstreamed.
     
    The new RH compiler that you get with CCS 6.x mps430-elf-gcc (version 4.9.something) is using newlib to implement libc.  Unfortunately, it doesn't produce the smallest code.  The code generation on the newer compiler is fairly decent if you avoid the libc calls and do your own thing.
     
    -rick
  23. Like
    Rickta59 got a reaction from greeeg in What is "our" time worth ?   
    So have you spent more time thinking about what you are going to charge than it is going to take you to write this code? Better factor that into how much your real rate turns out to be.
     
    Sometimes I wish I had become a plumber.  When someone's toilet or water pipe is broken they don't even ask how much. The just want it fixed and just fix it, now!  I'm not sure if plumber friends ask for free work but I doubt it.  I never have.  But I certainly have friends that think my computer knowledge is just something I should offer for free.
     
    I tend to do fixed price bids.  It makes both of us happy. They know what they are going to pay and I don't have to go crazy justifying my time. I usually spend enough time up front to figure out what it is going to take and then I just multiple by my hourly rate and I stop sweating about it,  I always create a list of software deliverables and provide a time table for when they will be delivered. Most times I do different phases to give the customer something they can look at and also so they feel confident about my direction.  I also provide a grace period after the customer receives the code and typically two weeks to accept it or complain.  I build in the cost of any test jigs or code I will have to develop.  If I have to do research I do that on my time to be sure I'm going to be able to deliver.  I just roll that time into my bid.  Before I do any of that I'm pretty confident the customer is going to engage my services before I even bother.
     
    As far as residuals. I've done it both ways. Low up front cost and higher percentage for me and also the inverse.  Unfortunately, my luck there has always been hit or miss.  Something I thought would sell a lot didn't and I got screwed and conversely things I thought were really stupid I missed a big payout when they did sell.  The bottom line, get enough money to make you feel happy either way.
     
    -rick
  24. Like
    Rickta59 got a reaction from yyrkoon in What is "our" time worth ?   
    So have you spent more time thinking about what you are going to charge than it is going to take you to write this code? Better factor that into how much your real rate turns out to be.
     
    Sometimes I wish I had become a plumber.  When someone's toilet or water pipe is broken they don't even ask how much. The just want it fixed and just fix it, now!  I'm not sure if plumber friends ask for free work but I doubt it.  I never have.  But I certainly have friends that think my computer knowledge is just something I should offer for free.
     
    I tend to do fixed price bids.  It makes both of us happy. They know what they are going to pay and I don't have to go crazy justifying my time. I usually spend enough time up front to figure out what it is going to take and then I just multiple by my hourly rate and I stop sweating about it,  I always create a list of software deliverables and provide a time table for when they will be delivered. Most times I do different phases to give the customer something they can look at and also so they feel confident about my direction.  I also provide a grace period after the customer receives the code and typically two weeks to accept it or complain.  I build in the cost of any test jigs or code I will have to develop.  If I have to do research I do that on my time to be sure I'm going to be able to deliver.  I just roll that time into my bid.  Before I do any of that I'm pretty confident the customer is going to engage my services before I even bother.
     
    As far as residuals. I've done it both ways. Low up front cost and higher percentage for me and also the inverse.  Unfortunately, my luck there has always been hit or miss.  Something I thought would sell a lot didn't and I got screwed and conversely things I thought were really stupid I missed a big payout when they did sell.  The bottom line, get enough money to make you feel happy either way.
     
    -rick
  25. Like
    Rickta59 got a reaction from dubnet in What is "our" time worth ?   
    So have you spent more time thinking about what you are going to charge than it is going to take you to write this code? Better factor that into how much your real rate turns out to be.
     
    Sometimes I wish I had become a plumber.  When someone's toilet or water pipe is broken they don't even ask how much. The just want it fixed and just fix it, now!  I'm not sure if plumber friends ask for free work but I doubt it.  I never have.  But I certainly have friends that think my computer knowledge is just something I should offer for free.
     
    I tend to do fixed price bids.  It makes both of us happy. They know what they are going to pay and I don't have to go crazy justifying my time. I usually spend enough time up front to figure out what it is going to take and then I just multiple by my hourly rate and I stop sweating about it,  I always create a list of software deliverables and provide a time table for when they will be delivered. Most times I do different phases to give the customer something they can look at and also so they feel confident about my direction.  I also provide a grace period after the customer receives the code and typically two weeks to accept it or complain.  I build in the cost of any test jigs or code I will have to develop.  If I have to do research I do that on my time to be sure I'm going to be able to deliver.  I just roll that time into my bid.  Before I do any of that I'm pretty confident the customer is going to engage my services before I even bother.
     
    As far as residuals. I've done it both ways. Low up front cost and higher percentage for me and also the inverse.  Unfortunately, my luck there has always been hit or miss.  Something I thought would sell a lot didn't and I got screwed and conversely things I thought were really stupid I missed a big payout when they did sell.  The bottom line, get enough money to make you feel happy either way.
     
    -rick
×
×
  • Create New...