ARM project manager

May 11, 2008
22,551
1,471
126
Are their people interested in testing a free opensource that is a handy tool when programming embedded ARM chips ? I am sure some errors still exist and would be glad when people interested point them out to me.

The sources i will provide on sourceforge as well when the program is fully finished to carry the V1.0 number. It is my second program i have written autodidact style so when i have added the sourcecode as well, do not get disgusted right away when there are some awful programming techniques. :D
I will add a *.pdf file that explains most of the options and otherwise will provide links to the GNU ARM site.

The program can be used with Yagartho from Michael Fischer.
Or WINARM from Martin Thomas. The program W-ARM :awe: works very well with programmers notepad 2 although any editor that can pass parameters and start external programs and can capture output from those external programs will work.
The program creates a makefile and linker file while providing an easy of use environment to set and check options. The files W-ARM generates are to be used with the GNU GCC compiler for ARM. Many of these programs exist, but all are separate or command line programs.

It will create project directories and copy the necessary start up files only when you want it too. I have put in a lot of compiler options. Linker options are still limited but works. It has only support for the SAM7S series. I have included the new SAM3S4B, although i do not know if the linker will generate a proper memory map. Because i do not yet have a SAM3S4B to test with. When the program is fully up and running, it will also have the ability to program your device by use of an accompanying stript down bootloader/downloader for the ARM mcu in use . But for now the programming section is only visual and not functional.

I have written it to make my life easier, because when i am thinking and debugging of algorithms and statemachines i do not want to be bothered with makefiles and linkerfiles settings and other things the computer is much better at keeping track of then i am.

It runs on x86 windows xp ( have not tested it on windows 7 yet).

It will be on sourceforge in i expect 1 month from now(giving me some time and slack to add some information in the pdf).

Here are some pictures.


Imag1.jpg


Imag2.jpg


Imag3.jpg


Imag4.jpg


Imag5.jpg


Image6.jpg
 
Last edited:
May 11, 2008
22,551
1,471
126
Forgot to mention you can save your settings as the standard configuration : [Save].
As another configuration [Save as...]
You can load any previous saved configuration [Load}.
And you can reset the current configuration to it's default settings for an given selected MCU.
When you select an MCU , the program will load up the default values for this MCU.

The program allows only 1 instance running and will load up the running instance when you press the button in the programmers notepad2, handy while editing :).

The fifth picture is an old one while running the debugger. That is why the buttons seem only half drawn.
:)
 
May 11, 2008
22,551
1,471
126
lol, you'r funny ;),

anyhow the program seems interesting, do you know by any chance if a controller can be read to figure out it's settings?
like taking an SSD and reading out the functions and algorithms it's using by posing it "questions" or "pulling" some firmware or architectural output from it?
that's very interesting.

if you know the manufacturer number of the controller and if the internal memory of the controller itself is not protected against reading by third parties and you have the right software and/or hardware tools it is possible. But when you have a memory dump, you need a program to translate it to instructions. That would be a disassembler. Now these instructions are not nice readable higher languages like C or C++ or basic. These are mnemonics. Here is a not entirely accurate example but it is to show you the difference. For the ARM architecture this could be :

LDR r0,= load
LDR r1,= start
LDR r2,= end

1:
CMP r1,r2
LDMLTIA r0!,{r3}
STMLTIA r1!,{r3}
BLT 1b


This could be something (Not entirely true but it is the idea) :

For(i=start;i< end;i++)
{
memory_array_A = memory_array_B[i + load];
}


(In all honesty , i took the assembler example from literature and translate it on the fly , thus it may not be entirely accurate).

When you have found out what all these instructions as a group perform, you know what to do. But to be honest, i would not be surprised if the firmware was encrypted. Meaning that you download firmware but you cannot read or understand it. When the controller downloads it, it decrypts it to the actual machine code instructions :
Would look like for example :

0000 0000 0110 0110 1101 0001 0110 0110 1111 0000 0110 0110 1101 0100 0001 0110
0000 0000 0110 0110 1101 0100 0001 0110 0000 0001 0110 0110 1101 0100 0001 0110
0000 0000 0110 0110 1101 0001 0110 0110 0011 0010 0110 0110 1101 0100 0001 0110
0000 0000 0110 0110 1101 0100 0001 0110 0000 0110 0110 0110 1101 0100 0001 0110

or
0x Fe45 5621
0x 5568 3345

And stores these into its internal memory (usually flash).

That is no fun. Only someone who gets a kick out of it enjoys deciphering this.

But when decrypted, you can run it through a disassembler again .
 
Last edited:

mutz

Senior member
Jun 5, 2009
343
0
0
shaise this is never easy as it seems at a first look, always getting further and further complicated,
doubtfully if the firmware isn't protected with any current SSD.
who said computers has became less complicated :\.
 
May 11, 2008
22,551
1,471
126
shaise this is never easy as it seems at a first look, always getting further and further complicated,
doubtfully if the firmware isn't protected with any current SSD.
who said computers has became less complicated :\.

Well, it depends. If you know what you are looking for it becomes more easy.
I always had an extreme respect for people who are able to hack software and hardware.

But not so long ago, although i still find it impressive hacking lost some of its mystics. I found out that when writing C-code, it always uses a stack in a similar way. And al functions access this stack in the same way. I never knew c code followed a standard. I always assumed it would just generate the best code for that situation. I took my assembler programs as an example, every program was different and accessed different memory while using the same (selfmade) libraries to simplify writing in assembler( little MCU's only). I was already into c- code then but i never learned what the compiler actually does or that there was a c - standard. I myself am not a hacker though, i never found it interesting. I prefer to make thing from ground up or look at existing things and see how i can improve them. ^_^

Tomorrow i will be buying a new keyboard. my old one is worn out for fast typing.
 
Last edited:

mutz

Senior member
Jun 5, 2009
343
0
0
Well, it depends. If you know what you are looking for it becomes more easy.
i'm saying, each level you dig reveals a more advanced level, this isn't bad in any way of course, it only makes one more and more aware and better his/her understanding with the system.
it is a challenge and also very interesting, it actually triggers the mind to think further, deeper, wider and more and more creative.
as far as one goes, the further it takes him.
yet as you would like to start get going with it, it opens up bigger and wider challenges which seems to never cease, it can be quite frustrating, yet if you love what you are doing, it is also quite charming, it has the potential of taking you to places you have never dreamed and the joy of understanding something deeply thus being able to play with it and create new things.
after some time you look back and say wow, look what has happened in the last year!
it's a wonderful feeling.
 
May 11, 2008
22,551
1,471
126
Well, if you are interested, good luck :).

Hooray !
I have a new keyboard. A microsoft comfort curved keyboard :).


For you or anybody interested in ARM CORTEX-M3 MCU's :

Here is a website explaining why the cortex M3-M is such an improvement over the ARM7TDMI and what you have to do to start fresh or when you have to migrate your code from ARM7TDMI to CORTEX-M3.

http://www.embedded.com/design/220900313

I am planning for serious support for the cortex M3 version of Atmel. These SAM3 series are very fast and loaded with configurable features and not to expansive which is a plus if you are a man or woman of the technical hobby.
This is great material to do your own design on a small budget. Most of the time free readily available embedded operating systems are available. For little tasks that is.

Could be fun to hook up 4 of these little SAM3U or even SAM3S critters to each other by use of an FPGA. All connected through configured multi-port memory inside the FPGA. This memory would then be shared and partially used as "high speed" (In little MCU view) gateway for intercommunication. This would be easy because of the 4 way internal databus matrix of the SAM3U and the SAM3S.

SAM3U :
http://www.mcu-related.com/architectures/35-cortex-m3/76-sam3u-cortex-m3

Atmel Introduces Industry's First ARM Cortex-M3 Flash MCU With On-Chip High Speed USB Device-and-Transceiver
Atmel announced the SAM3U, the industry's first ARM Cortex-M3 Flash microcontroller integrating high speed (480 Mbps) USB Device-and-Transceiver, 4-bit 192 Mbps SDIO/SDCard 2.0, 8-bit 384 Mbps MMC 4.3 Host and 48 Mpbs SPI interfaces on-chip. This connectivity, together with the SAM3U's 96 MHz/1.25 DMIPS/MHz operating frequency, makes the SAM3U Cortex-M3 device suited to applications with intensive communications requirements, such as high speed gateways in industrial, medical, data processing and consumer applications.

It features 23 DMA channels and distributed on-chip memory including up to 52k Bytes of SRAM split in three blocks and up to 256k Bytes of Flash in two banks. The dual bank Flash offers in-application programming (IAP) where one memory bank is written with a new version of the firmware while the processor executes from the other bank. A programmable boot feature enables switching between the two Flash banks at the next MCU reboot.
 
Last edited:

tatteredpotato

Diamond Member
Jul 23, 2006
3,934
0
76
But not so long ago, although i still find it impressive hacking lost some of its mystics. I found out that when writing C-code, it always uses a stack in a similar way. And al functions access this stack in the same way. I never knew c code followed a standard. I always assumed it would just generate the best code for that situation. I took my assembler programs as an example, every program was different and accessed different memory while using the same (selfmade) libraries to simplify writing in assembler( little MCU's only). I was already into c- code then but i never learned what the compiler actually does or that there was a c - standard. I myself am not a hacker though, i never found it interesting. I prefer to make thing from ground up or look at existing things and see how i can improve them. ^_^

This is why I like studying compilers... gives you insight into just what that magical program does.

My problem with "hacking" is, like you, I like knowing things from the ground up and hacking relies on much unknown.
 

Modelworks

Lifer
Feb 22, 2007
16,240
7
76
If you are into reverse engineering Ida Pro has fairly good ARM support. I have used it for ARM and Mipsel . Althought the mips support could be better.

They just added some more ARM goodies in version 5.7
ARM architecture options for disassembly can be configured in the UI (Processor-specific options), in IDA.CFG or on command line (see documentation; ARMv6 is default)
Mach-O files and ELF files with EABI attributes the architecture is set automatically according to the flags in the binary support for NEON SIMD instructions (available if ARMv7 is selected); they are commonly found in the current iPhone/iPad files when ARMv7 is selected, a unified syntax is used for VFP and NEON instructions (Vxxx instead of old Fxxx)


And the support of different processors really has no competition. It has almost gotten to where with Proteus and Ida pro I don't even need a real processor to run the code until it gets really far along. It allows you to work on just about everything in simulations.

IDA Pro supports more than 50 families of processors. The source code of some of the processor modules is available in our free SDK.

IDA Pro Standard supports the following families (64-bit analysis is possible only with the Advanced Edition)

AMD K6-2 3D-Now! extensions
ARM Architecture versions from v3 to v7 including Thumb, Thumb-2, DSP instructions and NEON Advanced SIMD instructions.
ATMEL AVR (comes with source code)
DEC PDP-11(comes with source code)
Fujitsu FR (comes with source code)
GameBoy
H8/300 , H8/300L , H8/300H, H8S/2000 , H8S/2600(comes with source code)
H8/500(comes with source code)
Hitachi HD 6301, HD 6303, Hitachi HD 64180
INTEL 8080
INTEL 8085
INTEL 80196 (comes with source code)
INTEL 8051 (comes with source code)
INTEL 860XR (comes with source code)
INTEL 960 (comes with source code)
INTEL 80x86 and 80x87
INTEL Pentium family, including SSE, SSE2, SSE3, SSE4
Java Virtual Machine (comes with source code)
KR1878 (comes with source code)
Microsoft .NET
Mitsubishi MELPS740 or Renesas 740 (comes with source code)
MN102 (comes only with source code)
MOS Technologies 6502 (comes with source code)
Motorola MC680xx. , Motorola CPU32 (68330), Motorola MC6301, MC6303,
MC6800, MC6801, MC6803, MC6805, MC6808, MC6809, MC6811, M68H12C
Motorola ColdFire
NSC CR16 (comes only with source code)
NEC v850 and v850E1 (comes with source code)
EFI Byte Code (EBC) (comes with source code)
MSP430 (comes with source code)
PIC 12XX, PIC 14XX, PIC 18XX, PIC 16XXX (comes with source code)
Rockwell C39 (comes only with source code)
SAM8 (comes with source code)
SGS Thomson ST-7, and ST-20 (comes with source code)
TLCS900 (comes only with source code)
XA (comes with source code)
xScale
Z80, Zilog Z8, Zilog Z180, Zilog Z380 (comes with source code)

Oh and proteus, oh how I love this program, it isn't cheap but so worth it:
http://www.labcenter.com/products/vsm_overview.cfm
 
May 11, 2008
22,551
1,471
126
I hope that i can upload a beta of the W-ARM ide on august 3rd 2010.

Correction : Make that august 8 2010. Tight schedule this week unfortunately.

It consists of an ide project manager(W-ARM), an editor (Programmers notepad 2) GCC distribution 4.4.2 and utils for the arm from yagharto gcc distribution 20091223. And SAMBA 2.10.

It is still beta and as such the programming option does not work. Programming needs to be done with the atmel samba program. Later on i will have a small bootloader that works together with the W-ARM program. W-ARM will allow you to overwrite the W-ARM bootloader while not preserving the bootloader as SAMBA does. Or the bootloader will remain present and existing only the first 2 seconds after reset and afterward release full control to the application.

Compressed the file is 80,4MB(on HDD) and unpacked it is 398MB(W-ARM) + 7,80MB(SAMBA) .
It will be a compress and drop package. No installation required. The only thing you have to do is unpack to a location on the HDD or usb stick, activate W-ARM and click to update switches in the menu bar to update the paths of PN2 and set the environment variable of the current user. After that the ide is ready to be used. After that start the PN2 editor and follow the instructions in the manual.

If sourceforge allows me to upload it complete with the gcc files it will be 80,4MB(on HDD). Otherwise it will be less then 20MB and you have to download the yagharto gcc distribution20091223 yourself.

I already used the ide to write some programs on the ARM and all work. :).

I hope it will be used...
 
Last edited:
May 11, 2008
22,551
1,471
126
I am planning for an update for W-ARM V0.90. I hope to have it on sourceforge at 6 september.

This is the changelog for now :


# Version 0.90
- Added default ARM assembler scheme support for all ARM instructions, THUMB instructions, THUMB2 instructions, ARM registers.
And as directives. The highlighter of PN2 now works for assembler files as wel with the unfortunate exception of not making
the comments green as it does for the code. This is i think a bug in PN2.
Removed garbage from c scheme. Created a clean and simple default c scheme.

- W-ARM configfile parser changed. The "&" at the end of the line is now removed. The parser checks now for "/r/n".
As such the & can now be used in a projectname without errors and problems.

- W-ARM does not ask anymore to save your settings if you already have saved your settings after the last settings change.

- W-ARM greyes out menu options that do not apply for the selected MCU architecture.
Affected menu options is : instruction set. I have chosen not to grey out the architecture selection to keep freedom here.

- Solved error in statusfield2 text selection for SAM3S4B with respect to MCU specifications.

- W-ARM now has an option in the project menu which allows you to update the projectpath if it is outdated.
With this new option, there is no need to update the W-ARM configfile by hand in an text editor. All options can now be modified or updated from within the GUI.
 
May 11, 2008
22,551
1,471
126
W-ARM = updated.

#Placed V0.90 on sourceforge.
#Updated the manual to reflect the extra option.
#Added a readme.txt at sourceforge. As such changes can be directly read without downloading the entire package.

#Added a simple example program with a simple schematic to play with I2C/TWI and the mcp23008. I have written it for the olimex board. As such if you want to use it for a different hardware setup you have to edit the header files and adjust the pin designations for the used pins. To compile, just create a new project and copy the sourcefiles into the empty source(src) and header (inc)directories. After that, run the project manager and setup the configuration for the used SAM7S processor. Create the needed make and linker files. Compile and load into the controller with SAMBA :) .

I will soon update the ARM GCC pdf with information about the used ARM calling convention for the ARMv4T(ARM7TDMI) and ARMv7(CortexM3) and about stackframes.

Forgot the link :
http://sourceforge.net/projects/warmdevkit/files/

The link is in a post above but like this it is easier. ^_^
 
Last edited:

mutz

Senior member
Jun 5, 2009
343
0
0
Well, it depends. If you know what you are looking for it becomes more easy.
I always had an extreme respect for people who are able to hack software and hardware.
well i guess you were right about that, things do become simpler when you understand what is being said.

i recall having a computer here about 20 years ago, an IBM AT 386, and everything was so simple, you just insert a 1.2" disk inside the drive and everything is going up smoothly since, you play games, quests and digger :), you hoover over dos and play a bit with BASIC, it was like a dream compared to what is being today :D, in terms of simplicity.

today, first opening a computer, coming without any background, you simply don't have a clue about it.
going through windows, understanding what a browser is, what is an OS exactly, the numerous tweak and how it actually operates.

what is a CPU, why and what is a memory, and there are SO many things, and you have to understand in order to operate it, like driving a car, you have to use it for some time in order to be able to use it well.

you go over a year and a half and you can't even read a full hardware review, and not even a full single page of it! running from an acronym to the other, a simplified explanation to a more profound one, dragging you'r feet from one site to the other, trying to fill in the gaps, trying to figure out what has happened in recent years.

this is a tremendously hard work, pretty much insane, the amount of data which has been gathered and processed through these last years is entirely overwhelming, spending up to 12 and 15 hours a day and even more is not always enough, trying to figure out every piece of detail,
from math to electricity, to physics, chemistry and optics, and what else,
figure out the hundreds of applications, they're level of usage, the different fields, through RCE and the basic of programming, overclocking, cooling through it's variants, servers equipment, super computers, interconnects, controllers, HDD's, SSD's, materials, the chip architectures, families, models, legacy to current, and on and on,
till you reach a point where you can go well on technical documents or read fully advanced threads - wiki articles or an advanced specific hardware review and go on after without having to leave you'r browser tabs open for weeks,
till you have a well build and structured basic and advanced understanding of the way these machines operates.

this was extremely difficult,
yet it gives you the option to actually understand it profoundly and even do fruitful things with it,
rather then just drift along with the majority.
 
Last edited:

SamurAchzar

Platinum Member
Feb 15, 2006
2,422
3
76
Nice project :)

So I take it your configuration utility generates Makefiles? What did you do about flash downloads? SAMs are sucky in this regards due to being dual bank (on the 256KB chips).
I have a similar project of my own, yet slightly larger and more... commercialized ;)
 
May 11, 2008
22,551
1,471
126
Nice project :)

So I take it your configuration utility generates Makefiles? What did you do about flash downloads? SAMs are sucky in this regards due to being dual bank (on the 256KB chips).
I have a similar project of my own, yet slightly larger and more... commercialized ;)

Thank you ^_^ .

It generates make files and linker files. But it also keeps track of changes in the configuration. Nothing really amazing afcourse, it takes the administration out of the work for the user (like me). That is why i created it. That and i like lightweight programs that just work. My own toolkit for my future dreams :).

The 512KB version is a dual bank. All the others are single bank because one bank has a maximum size of 256KB. The flash pages are 256 bytes .
 

SamurAchzar

Platinum Member
Feb 15, 2006
2,422
3
76
You're welcome. On the 256KB SAM3U (and IIRC on the SAM3S as well), each bank is 128KB (mapped at 0x80000 and 0x100000). Pretty annoying.

Are you planning any particular project based on these chips? Or is the toolkit the project itself?
 
May 11, 2008
22,551
1,471
126
Well, i do want to build some experience with the arm architecture in general to increase my market value(In electronics you can never stop learning).

But i want to use that experience as well to build some handy devices as for example a little digital oscilloscope. And i just enjoy writing programs.
I also want to spend more time on robotics. I have mechanical parts and everything. I just need to make the electronics and the software. But personal issues have drained my energy. As such everything is slowed down at the moment.

This little spider is my source of inspiration for robotics : portia


For the size of it's brain it has some incredible features. Because it hunts by use of sight. But it is also able to recognize (although it is it's own mirror reflection) another spider in a mirror and respond on it.


http://en.wikipedia.org/wiki/Portia_(spider)

http://www.youtube.com/watch?v=AWX-jEvhMZk&feature=related

http://www.youtube.com/watch?v=iND8ucDiDSQ&feature=related

http://tolweb.org/accessory/Jumping_Spider_Vision?acc_id=1946

The dream is to write one day the software for multiple (more powerful arm cores) arm microcontrollers that combined create a 3d map of it's surroundings by use of stereo vision and other sensors.
I have been thinking of a lot of idea's to accomplish this. I hope that in the near future i will be able to put my idea's to the test.
 

Ninjahedge

Diamond Member
Mar 2, 2005
4,149
1
91
Billy, you could also use optics coupled with sonar to be able to get depth perception on a large scale.

I don't know how accurate you could get with a multi-media sensory device, but it seems like whenever we talk about navigation, we always try to make them operate like us.

Our biggest limitation is bandwidth and sensitivity, even so, our eyes are still much higher resolution than most available cameras (and have much better low-light capabilities than all but the more expensive video sensors)...

Maybe to get around it, thinks like IR lasers, sonar, or even radar pulses could be used instead of just light..... Active and passive perception?
 
May 11, 2008
22,551
1,471
126
Afcourse i will use sonar. But i will use it differently.
Here is how i envision it :
Life in nature uses the different senses to confirm information from those different senses. To create a mental mapping of the outside world. What i mean is, a baby or a child has a tendency to grap things and play with it. What in effect is happening, is that the hands are used to confirm the shape of what the baby can see. In the case of sonar, when a 3d map picture is being build from stereo camera data, the sonar is used to confirm the depth analysis taken from the focus feedback signal( z analysis can be done with the focus signal for the objective) and triangulation of the data from the 2 camera's. This way 2 senses(sonar as an alternative to touch) touch and vision are used to create the mapping of the outside world. The measurements must be done at the same time. I hope these are the correct words : The spatial information is as much important as the temporal information when using different sensors. That is why i want to do the hardware in a parallel manner. Only then it is truly at the same time and not in a programmed multitasking manner one task after another.

I agree with you, active and passive perception in a simultaneous manner is the way.

EDIT:

Forgot to add this link :
I found this site a 2 days ago.

http://www.societyofrobots.com/programming_computer_vision_tutorial_pt3.shtml

Very nicely done tracking of an object by the same person from the website :

http://www.youtube.com/watch?v=x2od63eroPY&feature=player_embedded#!
 
Last edited:
May 11, 2008
22,551
1,471
126
For those interested, i am continuing the improvement of the free W-ARM IDE.

This is the changelog for W-ARM V0.93:

# Change log :


# version 0.93
- Added more assembler instructions and directives to assembler scheme of PN2.
- Added basic support for the LPC2104, LPC2105, LPC2106, LPC2129, LPC134, LPC2136, LPC2138.
- Added basic template files for LPC210x. These are comprised of header files and basic startup C code.

- Added multi interrupt support for the SAM7S. All interrupt handlers can be written in C.
The assembler part is taken care of by the Advanced interrupt controller of the SAM7S and by a little assembler
code i have written from studying the examples in ARM cook books and the Atmel datasheet.
All interrupt handlers written in C are stored in RAM to speed up execution and reduce interrupt latency.
I have provided some examples.
I am busy standardizing the semi_stdio.c file with usefull functions. All these functions depend heavily
on the hardware if needed. But most only use generic ARM7TDMI core C code. When in case the onboard hardware gives a
speed advantage i will take advantage of this hardware. All code has comments and is very clear to understand.

- Printstring supports now %b,%h and %d for unsigned conversion of 1 32bit value.
The routines are optimized to run as much from registers as possible. I estimate no stack is used.
All output is directly written into a memory buffer which serves for the UART TX interrupt.
Printstring can be configured to run in PIO mode or INT mode. The first is programmed IO in a software loop.
The second is interrupt based and free's up the CPU for other calculations if OS_MEM_PRTSTR_NO_WAIT is set to 1.
if OS_MEM_PRTSTR_NO_WAIT is set, then the user code must check for OS_MEM_UART_TXNRDY to be cleared before
using printstring again.

- There are 9 timers out of 11 timers available through use of functions and can be written to and read from similar as
hardware pheriperals.
Timer 10 is for now used by printstring but will be free to use when the multitask os i am working on is finished.
Timer 11 is used for the TWI hardware as timeout timer but will be free to use when the multitaks os i am working on is finished.
When the TWI interface or printstring are not used, Timers (11) and (10) can be used at any time.

- Removed a bug in the LPC linker generator.
- Removed a bug in the SAM7S linker generator where a possible alignment error could occur.
- Removed a visual bug at the project tab that popped up when the projectname is too short.

- A strlen function is added.

I hope it is useful, if there are any errors or bugs please let me know, i will solve them as fast as i can.

Here is the link :

http://sourceforge.net/projects/warmdevkit/files/
 

Ninjahedge

Diamond Member
Mar 2, 2005
4,149
1
91
WG, just a suggestion:

Passive stereo-audio reception might work if you had a way to compare the original sound to an echo and recognise both.

Could you do a wave-mapping of each or would that take too long to compare?
Woulf it be better to transform it into a limited bandwidth frequency domain representation and then compare other noises to it to see what might match, but at a lower amplitude? Kind of like what we do with our minds when walking into a dark room. We hear our own footsteps, or other ambient noises and get a "feel" for the rooms dimensions.

We usually do not get the feel for the coffee table we bang our shins into, but still, you can usually tell the difference between a living room and a warehouse.....