In this paper, we propose the use of genetic programming (GP) to design piecewise maps to generate chaotic spreading codes for direct sequence spread-spectrum communications. Using appropriate functional operators, we use GP to construct exploitable maps on the interval [0, 1]. The correlation performance of the maps is the objective function that is optimized using GP. Thus, the auto-correlation and cross-correlation performance of the maps are used as fitness measures to differentiate between potential solutions and a multi-objective GP is used to evolve maps. We are thus able to design specific maps under different number of users and show that it is better to design maps assuming large number of users as such maps work well for lower number of users. Further, in order to be able to design maps for use under different conditions of channel signal-to-noise ratio (SNR), we propose the use of the theoretical bit error rate performance of the maps as the objective function to be optimized by GP. Using this objective function, we can design maps for different conditions including channel SNR levels and number of users. We show that GP can design maps at degraded system conditions, which also work well at better system conditions. We compare the performance of the GP generated maps with other chaotic maps, as well as the traditionally used gold code through simulations. Finally, we apply GP to design maps in scenarios where mathematical design procedures cannot be applied. Using simulated channels under different channel conditions such as colored noise and multipath fading scenarios, we use GP to design maps whose performance is better than the other approaches. Thus, we show that GP can be used to design maps for different channel conditions and is therefore a promising means of solving the system design problem in communication systems.