port install arm-elf-binutils
It threw a few shoes on MacOS 10.7. For some reason, on 10.6, the binaries that were build had PowerPC code.
The solution is to install gcc45, and then update the compiler flags in the portfile.
The resulting Portfile for arm-elf-binutils has the following directives:
depends_lib port:gettext
configure.cppflags -I${prefix}/include
universal_variant yes
configure.compiler macports-gcc-4.5
Someone should make me the maintainer of these...
Wednesday, November 2, 2011
Friday, October 28, 2011
I've always loved Keats.
I have always loved Keats, but I hate poetry. What I liked about him was that he was trying to find the essence of what made poetry good. Sometime in my youth, I grabbed onto that idea and I never could quite let go of that concept. I find that I will analyze things without knowing it, just to determine what makes it good. It's one of my happy actions.
I have decided that I the best two examples of good percussion in rock are Kashmir and Lost in the Supermarket. Percussion has a history of directing musical traffic, and thankfully jazz and the big band remedied that; however, people often run a beautiful musical piece with poor percussion. It's like directing traffic in China. It works, but it's not pretty. In the case of Kashmir, the slightly shifted signature perfectly carries the melody. In the case of Lost in the Supermarket, the beat changes with the mood of the measures. The most important part is the the transitions. Both songs have perfect percussion transitions. The percussion is what makes the song in both cases, and if you play either without it, you have nothing note worthy.
I love music.
I have decided that I the best two examples of good percussion in rock are Kashmir and Lost in the Supermarket. Percussion has a history of directing musical traffic, and thankfully jazz and the big band remedied that; however, people often run a beautiful musical piece with poor percussion. It's like directing traffic in China. It works, but it's not pretty. In the case of Kashmir, the slightly shifted signature perfectly carries the melody. In the case of Lost in the Supermarket, the beat changes with the mood of the measures. The most important part is the the transitions. Both songs have perfect percussion transitions. The percussion is what makes the song in both cases, and if you play either without it, you have nothing note worthy.
I love music.
Thursday, October 27, 2011
Atlanta Startup Scene
This article is about the start-up scene in Atlanta. The one thing that I noticed was that the Atlanta scene seemed a bit software focused, but more to the point, the Atlanta money likes software because it is comfortable. I have reviewed and seen many business presentations over the years in and around Atlanta, and very promising businesses are often ignored for the hope of another Google. The good news is that often these companies that are ignored have real, tangible goods, and that allows them to succeed without the angle money.
When not given a silver spoon, bootstrap yourself to success.
When not given a silver spoon, bootstrap yourself to success.
Friday, October 21, 2011
AT91SAM7S SPI
There seems to be a huge bug in the AT91SAM7S documentation regarding SPI. When you do a software reset via the control register, it resets the mode register.
So, after a AT91C_BASE_SPI -> SPI_CR = AT91C_SPI_SWRST;, you need to do a AT91C_BASE_SPI -> SPI_MR = 0x00000001;
Here's code to get the SPI transfer working:
The fact that a software reset changes the mode register is a pretty important thing to include in the documentation. It took me a week to figure out what was going on. I looked at the ATMEL SPI example, and it has the bug as well. Perhaps there was change between the Rev B and Rev C processors, such as the FLASH issue.
So, after a AT91C_BASE_SPI -> SPI_CR = AT91C_SPI_SWRST;, you need to do a AT91C_BASE_SPI -> SPI_MR = 0x00000001;
Here's code to get the SPI transfer working:
inline void spi_configure()
{
AT91PS_SPI pSPI = AT91C_BASE_SPI;
static unsigned int perphA=
((unsigned int) AT91C_PA11_NPCS0 ) |
((unsigned int) AT91C_PA13_MOSI ) |
((unsigned int) AT91C_PA12_MISO ) |
((unsigned int) AT91C_PA14_SPCK ); // Peripheral A
AT91C_BASE_PIOA->PIO_ASR = perphA; //set the SPI pins to the periphial functions
AT91C_BASE_PIOA->PIO_PDR = (perphA); //disable GPIO from changing SPI pins.
AT91C_BASE_PMC->PMC_PCER = ((unsigned int) 1 << AT91C_ID_SPI); //enable SPI clock
AT91C_BASE_SPI -> SPI_CR = AT91C_SPI_SWRST;
AT91C_BASE_SPI -> SPI_CR = AT91C_SPI_SPIEN;
AT91C_BASE_SPI -> SPI_MR = 0x00000001; //Enable the MASTER mode
You can then see the transfers on the MOSI pin with:unsigned int spi_test()
{
AT91PS_SPI pSPI = AT91C_BASE_SPI;
unsigned int data=0x55555555;
data = data & 0x010FFFFF; // mask non-used bits
pSPI -> SPI_TDR = data;
return(data);
}
The fact that a software reset changes the mode register is a pretty important thing to include in the documentation. It took me a week to figure out what was going on. I looked at the ATMEL SPI example, and it has the bug as well. Perhaps there was change between the Rev B and Rev C processors, such as the FLASH issue.
Straight outta Dunwoody.
I used to live near Dunwoody.
Straight Outta Dunwoody on youtube.
The one thing that I will give them is that they are indeed correct, it is clean. In south Fulton, people seem to think that everything else is someone else's job. I find that I would pick up trash at the bus stop, whereas in south Fulton, I would not even consider it.
Straight Outta Dunwoody on youtube.
The one thing that I will give them is that they are indeed correct, it is clean. In south Fulton, people seem to think that everything else is someone else's job. I find that I would pick up trash at the bus stop, whereas in south Fulton, I would not even consider it.
Thursday, October 20, 2011
It's China.
There has been a buzz on the Chinese boards about the
toddler hit by a car. Having spent over a year on the ground in China, I can say that I completely understand the response. The problem that I have found in China is that it is a liability to take on any responsibility as the government or people will use it against you. As a non-Chinese that travels off the beaten path, the only thing that I am afraid of is the police and military. They want my money, they want my passport, and the only thing that has saved me this far is that I do not look like I will hit you the throat and run. I would also walk by a bleeding child. I have walked by the new born females on the streets of Harbin in the winter because it would bring attention to myself, I would be forced to pay a bribe, and explain where I got the child because "children are not disposed off on the street" (that's a quote from the police officier to which I mentioned what was down the streets).
I'm terribly sorry China, but you think that you are great, and you are actually a scary place. The 'win at all costs' culture just means marginalization of those who are willing to accept responsibility. My Chinese friends will disagree with that statement, but I will point out the possibly underaged olympic team, the milk, and my favorite: "My father is Li Gang!"
toddler hit by a car. Having spent over a year on the ground in China, I can say that I completely understand the response. The problem that I have found in China is that it is a liability to take on any responsibility as the government or people will use it against you. As a non-Chinese that travels off the beaten path, the only thing that I am afraid of is the police and military. They want my money, they want my passport, and the only thing that has saved me this far is that I do not look like I will hit you the throat and run. I would also walk by a bleeding child. I have walked by the new born females on the streets of Harbin in the winter because it would bring attention to myself, I would be forced to pay a bribe, and explain where I got the child because "children are not disposed off on the street" (that's a quote from the police officier to which I mentioned what was down the streets).
I'm terribly sorry China, but you think that you are great, and you are actually a scary place. The 'win at all costs' culture just means marginalization of those who are willing to accept responsibility. My Chinese friends will disagree with that statement, but I will point out the possibly underaged olympic team, the milk, and my favorite: "My father is Li Gang!"
Subscribe to:
Posts (Atom)